From c9061f242b99862bd32ce1ae3fefa1629a614bc1 Mon Sep 17 00:00:00 2001
From: Viktor Szakats <commit@vsz.me>
Date: Wed, 31 Aug 2022 14:31:01 +0000
Subject: [PATCH] misc: spelling fixes

Found using codespell 2.2.1.

Also delete the redundant protocol designator from an archive.org URL.

Reviewed-by: Daniel Stenberg
Closes #9403
---
 RELEASE-NOTES           | 4 ++--
 docs/BINDINGS.md        | 2 +-
 include/curl/multi.h    | 2 +-
 lib/hostip.c            | 2 +-
 lib/imap.c              | 4 ++--
 lib/multi.c             | 2 +-
 lib/url.c               | 6 ++++--
 lib/urlapi.c            | 2 +-
 lib/vauth/vauth.h       | 2 +-
 lib/vquic/msh3.c        | 4 ++--
 lib/vtls/schannel.c     | 4 ++--
 m4/curl-gnutls.m4       | 2 +-
 m4/xc-lt-iface.m4       | 2 +-
 m4/zz40-xc-ovr.m4       | 4 ++--
 tests/data/test368      | 2 +-
 tests/data/test435      | 2 +-
 tests/libtest/lib1906.c | 2 +-
 tests/unit/unit1655.c   | 2 +-
 18 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 30165420bb..36cd87e3bb 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -99,7 +99,7 @@ This release includes the following bugfixes:
  o hostip: resolve *.localhost to 127.0.0.1/::1 [127]
  o HTTP3.md: update to msh3 v0.4.0 [126]
  o http: typecast the httpreq assignment to avoid icc compiler warning [76]
- o http_aws_sigv4.c: remove two unusued includes [36]
+ o http_aws_sigv4.c: remove two unused includes [36]
  o http_chunks: remove an assign + typecast [82]
  o hyper: customize test1274 to how hyper unfolds headers [131]
  o hyper: enable obs-folded multiline headers [101]
@@ -145,7 +145,7 @@ This release includes the following bugfixes:
  o sendf: fix paused header writes since after the header API [89]
  o sendf: make Curl_debug a void function [81]
  o sendf: skip storing HTTP headers if HTTP disabled [73]
- o sendf: store the header type in an usigned char to avoid icc warnings [79]
+ o sendf: store the header type in an unsigned char to avoid icc warnings [79]
  o splay: avoid using -1 in unsigned variable [78]
  o test3026: add support for Windows using native Win32 threads [65]
  o test3026: require 'threadsafe' [56]
diff --git a/docs/BINDINGS.md b/docs/BINDINGS.md
index b9f68ea257..c4a06ec783 100644
--- a/docs/BINDINGS.md
+++ b/docs/BINDINGS.md
@@ -119,7 +119,7 @@ Ruby: [curb](https://github.com/taf2/curb) written by Ross Bamford,
 
 [SP-Forth](https://sourceforge.net/p/spf/spf/ci/master/tree/devel/~ac/lib/lin/curl/) Written by Andrey Cherezov
 
-[SPL](https://web.archive.org/web/20210203022158/http://www.clifford.at/spl/spldoc/curl.html) Written by Clifford Wolf
+[SPL](https://web.archive.org/web/20210203022158/www.clifford.at/spl/spldoc/curl.html) Written by Clifford Wolf
 
 [Tcl](https://web.archive.org/web/20160826011806/mirror.yellow5.com/tclcurl/) Tclcurl by Andrés García
 
diff --git a/include/curl/multi.h b/include/curl/multi.h
index 30104925b7..2f3ec37a76 100644
--- a/include/curl/multi.h
+++ b/include/curl/multi.h
@@ -124,7 +124,7 @@ struct curl_waitfd {
 /*
  * Name:    curl_multi_init()
  *
- * Desc:    inititalize multi-style curl usage
+ * Desc:    initialize multi-style curl usage
  *
  * Returns: a new CURLM handle to use in all 'curl_multi' functions.
  */
diff --git a/lib/hostip.c b/lib/hostip.c
index bb94520acf..66f1f7d4b9 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -584,7 +584,7 @@ bool Curl_host_is_ipnum(const char *hostname)
 }
 
 
-/* return TRUE if 'part' is a case insentive tail of 'full' */
+/* return TRUE if 'part' is a case insensitive tail of 'full' */
 static bool tailmatch(const char *full, const char *part)
 {
   size_t plen = strlen(part);
diff --git a/lib/imap.c b/lib/imap.c
index 12ee2a47eb..ffa08bf7a4 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1886,8 +1886,8 @@ static char *imap_atom(const char *str, bool escape_only)
  */
 static bool imap_is_bchar(char ch)
 {
-  /* Peforming the alnum check with this macro is faster because of ASCII
-     artihmetic */
+  /* Performing the alnum check with this macro is faster because of ASCII
+     arithmetic */
   if(ISALNUM(ch))
     return true;
 
diff --git a/lib/multi.c b/lib/multi.c
index 5340a0c8a5..6e41fb2742 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -851,7 +851,7 @@ CURLMcode curl_multi_remove_handle(struct Curl_multi *multi,
   Curl_detach_connection(data);
 
   if(data->set.connect_only && !data->multi_easy) {
-    /* This removes a handle that was part the multi inteface that used
+    /* This removes a handle that was part the multi interface that used
        CONNECT_ONLY, that connection is now left alive but since this handle
        has bits.close set nothing can use that transfer anymore and it is
        forbidden from reuse. And this easy handle cannot find the connection
diff --git a/lib/url.c b/lib/url.c
index bfc784ff39..9759f08ad2 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -955,14 +955,16 @@ socks_proxy_info_matches(const struct proxy_info *data,
      see https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.1 */
   if(!data->user != !needle->user)
     return FALSE;
-  /* curl_strequal does a case insentive comparison, so do not use it here! */
+  /* curl_strequal does a case insensitive comparison,
+     so do not use it here! */
   if(data->user &&
      needle->user &&
      strcmp(data->user, needle->user) != 0)
     return FALSE;
   if(!data->passwd != !needle->passwd)
     return FALSE;
-  /* curl_strequal does a case insentive comparison, so do not use it here! */
+  /* curl_strequal does a case insensitive comparison,
+     so do not use it here! */
   if(data->passwd &&
      needle->passwd &&
      strcmp(data->passwd, needle->passwd) != 0)
diff --git a/lib/urlapi.c b/lib/urlapi.c
index dee4b5aa09..1e8046b741 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -1675,7 +1675,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
 
     if(appendquery) {
       /* Append the string onto the old query. Add a '&' separator if none is
-         present at the end of the exsting query already */
+         present at the end of the existing query already */
       size_t querylen = u->query ? strlen(u->query) : 0;
       bool addamperand = querylen && (u->query[querylen -1] != '&');
       if(querylen) {
diff --git a/lib/vauth/vauth.h b/lib/vauth/vauth.h
index 1c4b5b5dc6..ec3b7db816 100644
--- a/lib/vauth/vauth.h
+++ b/lib/vauth/vauth.h
@@ -224,7 +224,7 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
 CURLcode Curl_auth_create_spnego_message(struct negotiatedata *nego,
                                          char **outptr, size_t *outlen);
 
-/* This is used to clean up the SPNEGO specifiec data */
+/* This is used to clean up the SPNEGO specific data */
 void Curl_auth_cleanup_spnego(struct negotiatedata *nego);
 
 #endif /* USE_SPNEGO */
diff --git a/lib/vquic/msh3.c b/lib/vquic/msh3.c
index e309be9dfa..dffa8a0733 100644
--- a/lib/vquic/msh3.c
+++ b/lib/vquic/msh3.c
@@ -114,7 +114,7 @@ CURLcode Curl_quic_connect(struct Curl_easy *data,
                            socklen_t addrlen)
 {
   struct quicsocket *qs = &conn->hequic[sockindex];
-  bool unsecure = !conn->ssl_config.verifypeer;
+  bool insecure = !conn->ssl_config.verifypeer;
   memset(qs, 0, sizeof(*qs));
 
   (void)sockfd;
@@ -132,7 +132,7 @@ CURLcode Curl_quic_connect(struct Curl_easy *data,
   qs->conn = MsH3ConnectionOpen(qs->api,
                                 conn->host.name,
                                 (uint16_t)conn->remote_port,
-                                unsecure);
+                                insecure);
   if(!qs->conn) {
     failf(data, "can't create msh3 connection");
     if(qs->api) {
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index 32abcaa744..9c138ef38a 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -793,7 +793,7 @@ schannel_acquire_credential_handle(struct Curl_easy *data,
     int crypto_settings_idx = 0;
 
 
-    /* If TLS 1.3 ciphers are explictly listed, then
+    /* If TLS 1.3 ciphers are explicitly listed, then
      * disable all the ciphers and re-enable which
      * ciphers the user has provided.
      */
@@ -913,7 +913,7 @@ schannel_acquire_credential_handle(struct Curl_easy *data,
       blocked_gcm_modes[0].MaximumLength = sizeof(BCRYPT_CHAIN_MODE_GCM);
       blocked_gcm_modes[0].Buffer = (PWSTR)BCRYPT_CHAIN_MODE_GCM;
 
-      /* if only one is disabled, then explictly disable the
+      /* if only one is disabled, then explicitly disable the
          digest cipher suite (sha384 or sha256) */
       if(disable_aes_gcm_sha384 != disable_aes_gcm_sha256) {
         crypto_settings[crypto_settings_idx].eAlgorithmUsage =
diff --git a/m4/curl-gnutls.m4 b/m4/curl-gnutls.m4
index 2bf67559d2..d6f4a97082 100644
--- a/m4/curl-gnutls.m4
+++ b/m4/curl-gnutls.m4
@@ -39,7 +39,7 @@ if test "x$OPT_GNUTLS" != xno; then
     addcflags=""
 
     if test "x$OPT_GNUTLS" = "xyes"; then
-      dnl this is with no partiular path given
+      dnl this is with no particular path given
       CURL_CHECK_PKGCONFIG(gnutls)
 
       if test "$PKGCONFIG" != "no" ; then
diff --git a/m4/xc-lt-iface.m4 b/m4/xc-lt-iface.m4
index ebdcb2e78c..337c9f9cdf 100644
--- a/m4/xc-lt-iface.m4
+++ b/m4/xc-lt-iface.m4
@@ -319,7 +319,7 @@ dnl   xc_lt_build_static_with_pic
 m4_define([_XC_CHECK_LT_BUILD_WITH_PIC],
 [dnl
 #
-# Find out whether libtool libraries would be built wit PIC
+# Find out whether libtool libraries would be built with PIC
 #
 
 case "x$pic_mode" in @%:@ ((((
diff --git a/m4/zz40-xc-ovr.m4 b/m4/zz40-xc-ovr.m4
index 30d205bfee..3b96e5f01b 100644
--- a/m4/zz40-xc-ovr.m4
+++ b/m4/zz40-xc-ovr.m4
@@ -360,7 +360,7 @@ dnl and stores the result in 'PATH_SEPARATOR', unless
 dnl the user has already set it with a non-empty value.
 dnl
 dnl This path separator is the symbol used to separate
-dnl or diferentiate paths inside the 'PATH' environment
+dnl or differentiate paths inside the 'PATH' environment
 dnl variable.
 dnl
 dnl Non-empty user provided 'PATH_SEPARATOR' always
@@ -594,7 +594,7 @@ dnl and stores the result in 'PATH_SEPARATOR', unless
 dnl the user has already set it with a non-empty value.
 dnl
 dnl This path separator is the symbol used to separate
-dnl or diferentiate paths inside the 'PATH' environment
+dnl or differentiate paths inside the 'PATH' environment
 dnl variable.
 dnl
 dnl Non-empty user provided 'PATH_SEPARATOR' always
diff --git a/tests/data/test368 b/tests/data/test368
index 2f13b5723a..505ce34ea9 100644
--- a/tests/data/test368
+++ b/tests/data/test368
@@ -27,7 +27,7 @@ Connection: close
 http
 </server>
  <name>
-Appened dash if -r range specified without one
+Append dash if -r range specified without one
  </name>
  <command>
 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -r 4
diff --git a/tests/data/test435 b/tests/data/test435
index eed9e29819..cfcca66dc7 100644
--- a/tests/data/test435
+++ b/tests/data/test435
@@ -23,7 +23,7 @@ Content-Length: 0
 http
 </server>
 <name>
-verify -w local/remote port+ip after connecton re-use
+verify -w local/remote port+ip after connection re-use
 </name>
 <command>
 http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w 'local port == %{local_port}\nlocal ip == %{local_ip}\nremote_ip == %{remote_ip}\nremote_port == %{remote_port}\n'
diff --git a/tests/libtest/lib1906.c b/tests/libtest/lib1906.c
index 80bb3ce640..3e237e2d4f 100644
--- a/tests/libtest/lib1906.c
+++ b/tests/libtest/lib1906.c
@@ -39,7 +39,7 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_CURLU, curlu);
   curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error_buffer);
   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
-  /* set a port number that makes this reqeuest fail */
+  /* set a port number that makes this request fail */
   curl_easy_setopt(curl, CURLOPT_PORT, 1L);
   curl_code = curl_easy_perform(curl);
   if(!curl_code)
diff --git a/tests/unit/unit1655.c b/tests/unit/unit1655.c
index 1f5a6c9610..a36ba8ce7c 100644
--- a/tests/unit/unit1655.c
+++ b/tests/unit/unit1655.c
@@ -105,7 +105,7 @@ do {
     struct demo victim;
     DOHcode d;
 
-    victim.canary1 = 87; /* magic numbers, arbritrarily picked */
+    victim.canary1 = 87; /* magic numbers, arbitrarily picked */
     victim.canary2 = 35;
     victim.canary3 = 41;
     d = doh_encode(name, DNS_TYPE_A, victim.dohbuffer,