CLEANUP: assorted typo fixes in the code and comments

This is 25th iteration of typo fixes
diff --git a/CONTRIBUTING b/CONTRIBUTING
index db89ef7..60a78ba 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -523,7 +523,7 @@
    should be able to tell whether or not a patch is likely to address an issue
    they are facing. Indicating what the code will do after the fix doesn't help
    if it does not say what problem is encountered without the patch. Note that
-   in some cases the bug is purely theorical and observed by reading the code.
+   in some cases the bug is purely theoretical and observed by reading the code.
    In this case it's perfectly fine to provide an estimate about possible
    effects. Also, in HAProxy, like many projects which take a great care of
    maintaining stable branches, patches are reviewed later so that some of them
diff --git a/INSTALL b/INSTALL
index 447b9a0..cc5b894 100644
--- a/INSTALL
+++ b/INSTALL
@@ -178,7 +178,7 @@
 regex engine which could be slow or even crash on certain patterns.
 
 If you plan on importing a particularly heavy configuration involving a lot of
-regex, you may benefit from using some alternative regex implementations sur as
+regex, you may benefit from using some alternative regex implementations such as
 PCRE. HAProxy natively supports PCRE and PCRE2, both in standard and JIT
 flavors (Just In Time). The following options are available depending on the
 library version provided on your system :
diff --git a/doc/SPOE.txt b/doc/SPOE.txt
index ba7aca0..4792963 100644
--- a/doc/SPOE.txt
+++ b/doc/SPOE.txt
@@ -450,7 +450,7 @@
 timeout processing <timeout>
   Set the maximum time to wait for a stream to process an event, i.e to acquire
   a stream to talk with an agent, to encode all messages, to send the NOTIFY
-  frame, to receive the corrsponding acknowledgement and to process all
+  frame, to receive the corresponding acknowledgement and to process all
   actions. It is applied on the stream that handle the client and the server
   sessions.
 
diff --git a/doc/configuration.txt b/doc/configuration.txt
index bb4b4fc..556e977 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -813,7 +813,7 @@
   - a non-nul integer (e.g. '1'), always returns "true".
   - a predicate optionally followed by argument(s) in parenthesis.
   - a condition placed between a pair of parenthesis '(' and ')'
-  - a question mark ('!') preceeding any of the non-empty elements above, and
+  - a question mark ('!') preceding any of the non-empty elements above, and
     which will negate its status.
   - expressions combined with a logical AND ('&&'), which will be evaluated
     from left to right until one returns false
@@ -17798,11 +17798,11 @@
   Returns the ID of the error that might have occurred on the current
   connection. Any strictly positive value of this fetch indicates that the
   connection did not succeed and would result in an error log being output (as
-  decribed in section 8.2.5). See the "fc_conn_err_str" fetch for a full list of
+  described in section 8.2.5). See the "fc_conn_err_str" fetch for a full list of
   error codes and their corresponding error message.
 
 fc_conn_err_str : string
-  Returns an error message decribing what problem happened on the current
+  Returns an error message describing what problem happened on the current
   connection, resulting in a connection failure. This string corresponds to the
   "message" part of the error log format (see section 8.2.5). See below for a
   full list of error codes and their corresponding error messages :
diff --git a/doc/internals/fd-migration.txt b/doc/internals/fd-migration.txt
index 010431d..aaddad3 100644
--- a/doc/internals/fd-migration.txt
+++ b/doc/internals/fd-migration.txt
@@ -60,7 +60,7 @@
       allowed to run anymore. The tasks retrieve their execution context from
       the scheduler in the arguments, but will check the tasks' context from
       the structure under the lock to detect this possible change, and abort.
-    - at this point the takeover suceeded, the idle_conns_lock is released and
+    - at this point the takeover succeeded, the idle_conns_lock is released and
       the connection and its FD are now owned by the caller
 
   2) poll report: happens on late rx, shutdown or error on idle conns
@@ -81,7 +81,7 @@
     - check the task/tasklet's context to verify that no recently completed
       takeover() stole the connection. If it's NULL, the connection was lost,
       the lock is released and the task/tasklet killed. Otherwise it is
-      guaranted that no other thread may use that connection (current takeover
+      guaranteed that no other thread may use that connection (current takeover
       candidates are waiting on the lock, previous owners waking from poll()
       lost their bit in the thread_mask and will not touch the FD).
     - the connection is removed from the idle conns list. From this point on,
diff --git a/include/import/ebmbtree.h b/include/import/ebmbtree.h
index 23ef554..f99c16b 100644
--- a/include/import/ebmbtree.h
+++ b/include/import/ebmbtree.h
@@ -566,7 +566,7 @@
 
 /* Insert ebmb_node <new> into a prefix subtree starting at node root <root>.
  * Only new->key and new->pfx need be set with the key and its prefix length.
- * Note that bits between <pfx> and <len> are theorically ignored and should be
+ * Note that bits between <pfx> and <len> are theoretically ignored and should be
  * zero, as it is not certain yet that they will always be ignored everywhere
  * (eg in bit compare functions).
  * The ebmb_node is returned.
diff --git a/include/import/ebtree.h b/include/import/ebtree.h
index 36fcef5..9e5c488 100644
--- a/include/import/ebtree.h
+++ b/include/import/ebtree.h
@@ -32,7 +32,7 @@
 
   Eg, to store 8, 10, 12, 13, 14 :
 
-             ultree          this theorical tree
+             ultree          this theoretical tree
 
                8                   8
               / \                 / \
diff --git a/reg-tests/lua/bad_http_clt_req_duration.vtc b/reg-tests/lua/bad_http_clt_req_duration.vtc
index 4952f61..119f7f6 100644
--- a/reg-tests/lua/bad_http_clt_req_duration.vtc
+++ b/reg-tests/lua/bad_http_clt_req_duration.vtc
@@ -16,7 +16,7 @@
 #       applet:start_response()
 #   end)
 #
-# This had as a consequence to log %TR field with approximatively the same value as
+# This had as a consequence to log %TR field with approximately the same value as
 # the LUA sleep time.
 
 varnishtest "LUA bug"
diff --git a/src/cfgcond.c b/src/cfgcond.c
index 50ba3df..4654c1b 100644
--- a/src/cfgcond.c
+++ b/src/cfgcond.c
@@ -323,7 +323,7 @@
 
 	/* ret=1, we have a term in the left hand set */
 
-	/* find an optionnal '&&' */
+	/* find an optional '&&' */
 	while (*in == ' ' || *in == '\t')
 		in++;
 
@@ -396,7 +396,7 @@
 
 	/* ret=1, we have a sub-expr in the left hand set */
 
-	/* find an optionnal '||' */
+	/* find an optional '||' */
 	while (*in == ' ' || *in == '\t')
 		in++;
 
diff --git a/src/ebmbtree.c b/src/ebmbtree.c
index 4a1bfc5..a3de9a1 100644
--- a/src/ebmbtree.c
+++ b/src/ebmbtree.c
@@ -63,7 +63,7 @@
 
 /* Insert ebmb_node <new> into a prefix subtree starting at node root <root>.
  * Only new->key and new->pfx need be set with the key and its prefix length.
- * Note that bits between <pfx> and <len> are theorically ignored and should be
+ * Note that bits between <pfx> and <len> are theoretically ignored and should be
  * zero, as it is not certain yet that they will always be ignored everywhere
  * (eg in bit compare functions).
  * The ebmb_node is returned.
diff --git a/src/fcgi-app.c b/src/fcgi-app.c
index 8bbfd10..8d18027 100644
--- a/src/fcgi-app.c
+++ b/src/fcgi-app.c
@@ -44,7 +44,7 @@
 /**************************************************************************/
 /* Makes a fcgi parameter name (prefixed by ':fcgi-') with <name> (in
  * lowercase). All non alphanumeric character are replaced by an underscore
- * ('_'). The result is copied into <dst>. the corrsponding ist is returned.
+ * ('_'). The result is copied into <dst>. the corresponding ist is returned.
  */
 static struct ist fcgi_param_name(char *dst, const struct ist name)
 {
diff --git a/src/fix.c b/src/fix.c
index 3ad3f2e..abf3119 100644
--- a/src/fix.c
+++ b/src/fix.c
@@ -246,7 +246,7 @@
 		if (!id)
 			goto not_found_or_invalid;
 		if (id == tagid) {
-			/* <tagId> found, return the corrsponding value */
+			/* <tagId> found, return the corresponding value */
 			return v;
 		}
 
diff --git a/src/lb_fwrr.c b/src/lb_fwrr.c
index 74c7fb2..a762623 100644
--- a/src/lb_fwrr.c
+++ b/src/lb_fwrr.c
@@ -340,7 +340,7 @@
 	grp = (s->flags & SRV_F_BACKUP) ? &p->lbprm.fwrr.bck : &p->lbprm.fwrr.act;
 
 	/* Delay everything which does not fit into the window and everything
-	 * which does not fit into the theorical new window.
+	 * which does not fit into the theoretical new window.
 	 */
 	if (!srv_willbe_usable(s)) {
 		fwrr_remove_from_tree(s);
diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c
index 1be7b96..61142ab 100644
--- a/src/mux_fcgi.c
+++ b/src/mux_fcgi.c
@@ -1375,7 +1375,7 @@
 			goto check_index;
 
 		/* If some special characters are found in the decoded path (\n
-		 * or \0), the PATH_INFO regex cannot match. This is theorically
+		 * or \0), the PATH_INFO regex cannot match. This is theoretically
 		 * valid, but probably unexpected, to have such characters. So,
 		 * to avoid any surprises, an error is triggered in this
 		 * case.
diff --git a/src/peers.c b/src/peers.c
index e14f1b8..6a9b0df 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -951,7 +951,7 @@
 				 */
 				intencode(st->table->data_nbelem[data_type], &chunkq);
 
-				/* for array of freq counters, there is an additionnal
+				/* for array of freq counters, there is an additional
 				 * period parameter to encode
 				 */
 				if (stktable_data_types[data_type].std_type == STD_T_FRQP)
@@ -2179,7 +2179,7 @@
 		goto ignore_msg;
 	}
 
-	/* Check if there there is the additionnal expire data */
+	/* Check if there there is the additional expire data */
 	intdecode(msg_cur, msg_end);
 	if (*msg_cur) {
 		uint64_t data_type;
@@ -2205,7 +2205,7 @@
 					/* check if the data_type match the current from the bitfield */
 					if (type != data_type) {
 						p->remote_table = NULL;
-						TRACE_PROTO("meta data missmatch type", PEERS_EV_DEFMSG, NULL, p);
+						TRACE_PROTO("meta data mismatch type", PEERS_EV_DEFMSG, NULL, p);
 						goto ignore_msg;
 					}
 
@@ -2242,7 +2242,7 @@
 					/* check if the data_type match the current from the bitfield */
 					if (type != data_type) {
 						p->remote_table = NULL;
-						TRACE_PROTO("meta data missmatch type", PEERS_EV_DEFMSG, NULL, p);
+						TRACE_PROTO("meta data mismatch type", PEERS_EV_DEFMSG, NULL, p);
 						goto ignore_msg;
 					}
 
diff --git a/src/xprt_quic.c b/src/xprt_quic.c
index fea9a01..e4609d3 100644
--- a/src/xprt_quic.c
+++ b/src/xprt_quic.c
@@ -1725,7 +1725,7 @@
 	reuse_wbuf = 0;
 	wbuf = q_wbuf(qc);
 	qel = &qc->els[tel];
-	/* When entering this function, the writter buffer must be empty.
+	/* When entering this function, the writer buffer must be empty.
 	 * Most of the time it points to the reader buffer.
 	 */
 	while ((q_buf_empty(wbuf) || reuse_wbuf)) {
diff --git a/tests/exp/filltab25.c b/tests/exp/filltab25.c
index 956e3b5..1197143 100644
--- a/tests/exp/filltab25.c
+++ b/tests/exp/filltab25.c
@@ -58,7 +58,7 @@
 void put_srv(struct srv *s) {
 	if (s->w <= 0 ||
 	    s->next >= 2*sw ||    /* delay everything which does not fit into the window */
-	    s->next >= sw+nsw) {  /* and everything which does not fit into the theorical new window */
+	    s->next >= sw+nsw) {  /* and everything which does not fit into the theoretical new window */
 		/* put into next tree */
 		s->next -= sw; // readjust next in case we could finally take this back to current.
 		queue_by_weight_0(next_tree, s);
@@ -348,7 +348,7 @@
 				s->w = w;
 
 				/* we must measure how far we are from the end of the current window
-				 * and try to fit their as many entries as should theorically be.
+				 * and try to fit their as many entries as should theoretically be.
 				 */
 
 				//s->w = s->w * (2*sw - p) / sw;