CLEANUP: assorted typo fixes in the code and comments
This is 10th iteration of typo fixes
diff --git a/examples/transparent_proxy.cfg b/examples/transparent_proxy.cfg
index b514ae3..a8cf6d9 100644
--- a/examples/transparent_proxy.cfg
+++ b/examples/transparent_proxy.cfg
@@ -31,7 +31,7 @@
# The following would be even better but this did not seam to work on the pfSense2.1 distribution of FreeBSD 8.3:
# fwd 127.0.0.1:80 tcp from any 80 to any in recv ${outside_iface} uid ${proxy_uid}
#
-# If only 'pf' is currently used some aditional steps are needed to load and configure ipfw:
+# If only 'pf' is currently used some additional steps are needed to load and configure ipfw:
# You need to configure this to always run on startup:
#
# /sbin/kldload ipfw
@@ -40,13 +40,13 @@
# ipfw add 10 fwd localhost tcp from 192.168.0.40 80 to any in recv em0
#
# the above does the following:
-# - load the ipfw kernal module
+# - load the ipfw kernel module
# - set pf as the outer firewall to keep control of routing packets for example to route them to a non-default gateway
# - enable ipfw
# - set a rule to catches reply traffic on em0 coming from the webserver
#
# --- Step 2 ---
-# To also make the client connection transparent its possible to redirect incomming requests to HAProxy with a pf rule:
+# To also make the client connection transparent its possible to redirect incoming requests to HAProxy with a pf rule:
# rdr on em1 proto tcp from any to 192.168.0.40 port 80 -> 192.168.1.22
# here em1 is the interface that faces the clients, and traffic that is originally send straight to the webserver is redirected to HAProxy
#
diff --git a/examples/wurfl-example.cfg b/examples/wurfl-example.cfg
index e5aa01d..52df68e 100644
--- a/examples/wurfl-example.cfg
+++ b/examples/wurfl-example.cfg
@@ -31,7 +31,7 @@
bind 192.168.1.22:80
default_backend TheBackend
- # inject a header called X-Wurfl-All with all the WURFL informations listed in wurfl-information-list
+ # inject a header called X-Wurfl-All with all the WURFL information listed in wurfl-information-list
http-request set-header X-Wurfl-All %[wurfl-get-all()]
# inject a header called X-WURFL-PROPERTIES with the "wurfl_id" information (should be listed in wurfl-information-list)
diff --git a/include/haproxy/htx-t.h b/include/haproxy/htx-t.h
index 49797d2..d9c08c8 100644
--- a/include/haproxy/htx-t.h
+++ b/include/haproxy/htx-t.h
@@ -80,8 +80,8 @@
* ...+--------------+----------+ =====> ...+----------+--------------+
*
*
- * At the end, if payload wrapping or blocks defragmenation is not enough, some
- * free space may be get back with a full defragmenation. This way, the holes in
+ * At the end, if payload wrapping or blocks defragmentation is not enough, some
+ * free space may be get back with a full defragmentation. This way, the holes in
* the middle are not reusable but count in the available free space. The only
* way to reuse this lost space is to fully defragmenate the HTX message.
*
diff --git a/include/haproxy/ssl_crtlist.h b/include/haproxy/ssl_crtlist.h
index c772839..13ac702 100644
--- a/include/haproxy/ssl_crtlist.h
+++ b/include/haproxy/ssl_crtlist.h
@@ -1,6 +1,6 @@
/*
* include/haproxy/ssl_crtlist.h
- * crt-list function prototyes
+ * crt-list function prototypes
*
* Copyright (C) 2020 HAProxy Technologies, William Lallemand <wlallemand@haproxy.com>
*
diff --git a/include/haproxy/tcpcheck-t.h b/include/haproxy/tcpcheck-t.h
index 042f833..29cb4cc 100644
--- a/include/haproxy/tcpcheck-t.h
+++ b/include/haproxy/tcpcheck-t.h
@@ -116,7 +116,7 @@
#define TCPCHK_RULES_SSL3_CHK 0x00000070
#define TCPCHK_RULES_AGENT_CHK 0x00000080
#define TCPCHK_RULES_SPOP_CHK 0x00000090
-/* Unused 0x000000A0..0x00000FF0 (reserverd for futur proto) */
+/* Unused 0x000000A0..0x00000FF0 (reserved for future proto) */
#define TCPCHK_RULES_TCP_CHK 0x00000FF0
#define TCPCHK_RULES_PROTO_CHK 0x00000FF0 /* Mask to cover protocol check */
diff --git a/include/haproxy/tools.h b/include/haproxy/tools.h
index 6c9f38d..2b003e4 100644
--- a/include/haproxy/tools.h
+++ b/include/haproxy/tools.h
@@ -568,12 +568,12 @@
*/
const void *my_memmem(const void *, size_t, const void *, size_t);
-/* get length of the initial segment consiting entirely of bytes within a given
+/* get length of the initial segment consisting entirely of bytes within a given
* mask
*/
size_t my_memspn(const void *, size_t, const void *, size_t);
-/* get length of the initial segment consiting entirely of bytes not within a
+/* get length of the initial segment consisting entirely of bytes not within a
* given mask
*/
size_t my_memcspn(const void *, size_t, const void *, size_t);
diff --git a/include/import/atomic-ops.h b/include/import/atomic-ops.h
index 0081f9a..6fe4c78 100644
--- a/include/import/atomic-ops.h
+++ b/include/import/atomic-ops.h
@@ -434,7 +434,7 @@
}) \
)
-/* exchage value <x> with integer value pointed to by pointer <ptr>, and return
+/* exchange value <x> with integer value pointed to by pointer <ptr>, and return
* previous <*ptr> value. <x> must be of the same size as <*ptr>.
*/
#define pl_xchg(ptr, x) ( \
diff --git a/reg-tests/http-messaging/h1_to_h1.vtc b/reg-tests/http-messaging/h1_to_h1.vtc
index 7694014..5b02f17 100644
--- a/reg-tests/http-messaging/h1_to_h1.vtc
+++ b/reg-tests/http-messaging/h1_to_h1.vtc
@@ -242,7 +242,7 @@
expect resp.status == 200
expect resp.body == "response 2"
- # third request is valid and advertises (and sends) somme contents
+ # third request is valid and advertises (and sends) some contents
txreq \
-req "POST" \
-url "/test23.html" \
diff --git a/reg-tests/lua/bad_http_clt_req_duration.vtc b/reg-tests/lua/bad_http_clt_req_duration.vtc
index a31f7d7..ae46ea1 100644
--- a/reg-tests/lua/bad_http_clt_req_duration.vtc
+++ b/reg-tests/lua/bad_http_clt_req_duration.vtc
@@ -4,7 +4,7 @@
# HTTP LUA applet callback should not update the date on which the HTTP client requests
# arrive. This was done just after the LUA applet has completed its job.
#
-# This patch simply removes the affected statement. The same fixe has been applied
+# This patch simply removes the affected statement. The same fix has been applied
# to TCP LUA applet callback.
#
# To reproduce this issue, as reported by Patrick Hemmer, implement an HTTP LUA applet
diff --git a/src/fcgi-app.c b/src/fcgi-app.c
index 3f315a6..212ea23 100644
--- a/src/fcgi-app.c
+++ b/src/fcgi-app.c
@@ -62,7 +62,7 @@
return ist2(dst, ofs1);
}
-/* Returns a pointer to the FCGi applicatrion mathing the name <name>. NULL is
+/* Returns a pointer to the FCGi application matching the name <name>. NULL is
* returned if no match found.
*/
struct fcgi_app *fcgi_app_find_by_name(const char *name)
diff --git a/src/h1.c b/src/h1.c
index 80f8192..368eb14 100644
--- a/src/h1.c
+++ b/src/h1.c
@@ -33,7 +33,7 @@
e = value->ptr + value->len;
while (++word.ptr < e) {
- /* skip leading delimitor and blanks */
+ /* skip leading delimiter and blanks */
if (unlikely(HTTP_IS_LWS(*word.ptr)))
continue;
@@ -106,7 +106,7 @@
e = value.ptr + value.len;
while (++word.ptr < e) {
- /* skip leading delimitor and blanks */
+ /* skip leading delimiter and blanks */
if (HTTP_IS_LWS(*word.ptr))
continue;
@@ -145,7 +145,7 @@
value->len = 0;
while (++word.ptr < e) {
- /* skip leading delimitor and blanks */
+ /* skip leading delimiter and blanks */
if (HTTP_IS_LWS(*word.ptr))
continue;
diff --git a/src/h1_htx.c b/src/h1_htx.c
index 9388680..351980b 100644
--- a/src/h1_htx.c
+++ b/src/h1_htx.c
@@ -45,7 +45,7 @@
/* Switch the message to tunnel mode. On the request, it must only be called for
* a CONNECT method. On the response, this function must only be called on
- * successfull replies to CONNECT requests or on protocol switching.
+ * successful replies to CONNECT requests or on protocol switching.
*/
static void h1_set_tunnel_mode(struct h1m *h1m)
{
@@ -202,7 +202,7 @@
if (uri.len > 4 && (uri.ptr[0] | 0x20) == 'h')
sl->flags |= ((uri.ptr[4] == ':') ? HTX_SL_F_SCHM_HTTP : HTX_SL_F_SCHM_HTTPS);
}
- /* Set bytes used in the HTX mesage for the headers now */
+ /* Set bytes used in the HTX message for the headers now */
sl->hdrs_bytes = htx_used_space(htx) - used;
/* If body length cannot be determined, set htx->extra to
@@ -277,7 +277,7 @@
}
if (((h1m->flags & H1_MF_METH_CONNECT) && code == 200) || code == 101) {
- /* Switch successfull replies to CONNECT requests and
+ /* Switch successful replies to CONNECT requests and
* protocol switching to tunnel mode. */
h1_set_tunnel_mode(h1m);
}
@@ -304,7 +304,7 @@
goto error;
sl->info.res.status = code;
- /* Set bytes used in the HTX mesage for the headers now */
+ /* Set bytes used in the HTX message for the headers now */
sl->hdrs_bytes = htx_used_space(htx) - used;
/* If body length cannot be determined, set htx->extra to
@@ -699,7 +699,7 @@
return 0;
}
-/* Appends the H1 representation of the header <n> witht the value <v> to the
+/* Appends the H1 representation of the header <n> with the value <v> to the
* chunk <chk>. It returns 1 if data are successfully appended, otherwise it
* returns 0.
*/
diff --git a/src/http_htx.c b/src/http_htx.c
index 0af9f51..fb6c70a 100644
--- a/src/http_htx.c
+++ b/src/http_htx.c
@@ -1626,7 +1626,7 @@
}
if (reply->ctype && !b_data(&reply->body.obj)) {
ha_warning("parsing [%s:%d] : content-type '%s' ignored by the http reply when used "
- "with an emtpy payload.\n",
+ "with an empty payload.\n",
px->conf.args.file, px->conf.args.line, reply->ctype);
free(reply->ctype);
reply->ctype = NULL;
@@ -1997,7 +1997,7 @@
htx = htxbuf(&http_errmsg->msg);
if (htx_free_data_space(htx) < global.tune.maxrewrite) {
ha_warning("config: errorfile '%s' runs over the buffer space"
- " reserved to headers rewritting. It may lead to internal errors if "
+ " reserved to headers rewriting. It may lead to internal errors if "
" http-after-response rules are evaluated on this message.\n",
(char *)node->key);
err_code |= ERR_WARN;
diff --git a/src/htx.c b/src/htx.c
index 4d9ef68..f4eda3e 100644
--- a/src/htx.c
+++ b/src/htx.c
@@ -198,13 +198,13 @@
/* Prepares the block to an expansion of its payload. The payload will be
* expanded by <delta> bytes and we need find where this expansion will be
* performed. It can be a compression if <delta> is negative. This function only
- * updates all addresses. The caller have the responsibility to performe the
+ * updates all addresses. The caller have the responsibility to perform the
* expansion and update the block and the HTX message accordingly. No error must
- * occurr. It returns following values:
+ * occur. It returns following values:
*
* 0: The expansion cannot be performed, there is not enough space.
*
- * 1: the expansion must be performed in place, there is enougth space after
+ * 1: the expansion must be performed in place, there is enough space after
* the block's payload to handle it. This is especially true if it is a
* compression and not an expension.
*
@@ -362,7 +362,7 @@
if (htx->head == htx->tail) {
/* If there is just one block in the HTX message, free space can
- * be ajusted. This operation could save some defrags. */
+ * be adjusted. This operation could save some defrags. */
struct htx_blk *lastblk = htx_get_blk(htx, htx->tail);
htx->head_addr = 0;
@@ -394,7 +394,7 @@
/* Looks for the HTX block containing the offset <offset>, starting at the HTX
* message's head. The function returns an htx_ret with the found HTX block and
* the position inside this block where the offset is. If the offset <offset> is
- * ouside of the HTX message, htx_ret.blk is set to NULL.
+ * outside of the HTX message, htx_ret.blk is set to NULL.
*/
struct htx_ret htx_find_offset(struct htx *htx, uint32_t offset)
{
@@ -436,7 +436,7 @@
/* Drains <count> bytes from the HTX message <htx>. If the last block is a DATA
* block, it will be cut if necessary. Others blocks will be removed at once if
* <count> is large enough. The function returns an htx_ret with the first block
- * remaing in the messsage and the amount of data drained. If everything is
+ * remaining in the message and the amount of data drained. If everything is
* removed, htx_ret.blk is set to NULL.
*/
struct htx_ret htx_drain(struct htx *htx, uint32_t count)
@@ -455,7 +455,7 @@
uint32_t sz = htx_get_blksz(blk);
enum htx_blk_type type = htx_get_blk_type(blk);
- /* Ingore unused block */
+ /* Ignore unused block */
if (type == HTX_BLK_UNUSED)
goto next;
@@ -631,7 +631,7 @@
blk = htx_defrag(htx, blk);
- /* Finaly, copy data. */
+ /* Finally, copy data. */
memcpy(htx_get_blk_ptr(htx, blk), tmp->area, tmp->data);
}
return blk;
@@ -657,7 +657,7 @@
while (blk && count) {
type = htx_get_blk_type(blk);
- /* Ingore unused block */
+ /* Ignore unused block */
if (type == HTX_BLK_UNUSED)
goto next;
@@ -752,7 +752,7 @@
if (ret == 3)
blk = htx_defrag(htx, blk);
- /* Finaly, copy data. */
+ /* Finally, copy data. */
ptr = htx_get_blk_ptr(htx, blk);
ist2bin_lc(ptr, name);
memcpy(ptr + name.len, value.ptr, value.len);
@@ -890,7 +890,7 @@
}
/* Add all headers from the list <hdrs> into the HTX message <htx>, followed by
- * the EOH. On sucess, it returns the last block inserted (the EOH), otherwise
+ * the EOH. On success, it returns the last block inserted (the EOH), otherwise
* NULL is returned. */
struct htx_blk *htx_add_all_headers(struct htx *htx, const struct http_hdr *hdrs)
{
@@ -904,7 +904,7 @@
}
/* Add all trailers from the list <hdrs> into the HTX message <htx>, followed by
- * the EOT. On sucess, it returns the last block inserted (the EOT), otherwise
+ * the EOT. On success, it returns the last block inserted (the EOT), otherwise
* NULL is returned. */
struct htx_blk *htx_add_all_trailers(struct htx *htx, const struct http_hdr *hdrs)
{
diff --git a/src/mux_h1.c b/src/mux_h1.c
index ac76339..776dee4 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -108,7 +108,7 @@
struct h1m req;
struct h1m res;
- enum http_meth_t meth; /* HTTP resquest method */
+ enum http_meth_t meth; /* HTTP request method */
uint16_t status; /* HTTP response status */
};
@@ -627,8 +627,8 @@
/*
* Initialize the mux once it's attached. It is expected that conn->ctx points
- * to the existing conn_stream (for outgoing connections or for incoming onces
- * during a mux upgrade) or NULL (for incoming ones during the connexion
+ * to the existing conn_stream (for outgoing connections or for incoming ones
+ * during a mux upgrade) or NULL (for incoming ones during the connection
* establishment). <input> is always used as Input buffer and may contain
* data. It is the caller responsibility to not reuse it anymore. Returns < 0 on
* error.
diff --git a/src/pattern.c b/src/pattern.c
index fbb5ae6..766bade 100644
--- a/src/pattern.c
+++ b/src/pattern.c
@@ -1901,7 +1901,7 @@
/* This function create sample found in <elt>, parse the pattern also
* found in <elt> and insert it in <expr>. The function copy <patflags>
* in <expr>. If the function fails, it returns0 and <err> is filled.
- * In succes case, the function returns 1.
+ * In success case, the function returns 1.
*/
static inline
int pat_ref_push(struct pat_ref_elt *elt, struct pattern_expr *expr,
@@ -2267,7 +2267,7 @@
* | `------------------------ key
* `-------------------------------- leading spaces ignored
*
- * Return non-zero in case of succes, otherwise 0.
+ * Return non-zero in case of success, otherwise 0.
*/
int pat_ref_read_from_file_smp(struct pat_ref *ref, const char *filename, char **err)
{
@@ -2343,7 +2343,7 @@
filename, strerror(errno));
goto out_close;
}
- /* succes */
+ /* success */
ret = 1;
out_close:
diff --git a/src/pool.c b/src/pool.c
index 89c2ba4..0680c8b 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -86,7 +86,7 @@
list_for_each_entry(entry, &pools, list) {
if (entry->size == size) {
/* either we can share this place and we take it, or
- * we look for a sharable one or for the next position
+ * we look for a shareable one or for the next position
* before which we will insert a new one.
*/
if (flags & entry->flags & MEM_F_SHARED) {
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 2d30ce4..d1e89e4 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -1583,7 +1583,7 @@
return 1;
}
-/* get the mean rtt of a client connexion */
+/* get the mean rtt of a client connection */
static int
smp_fetch_fc_rtt(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
@@ -1597,7 +1597,7 @@
return 1;
}
-/* get the variance of the mean rtt of a client connexion */
+/* get the variance of the mean rtt of a client connection */
static int
smp_fetch_fc_rttvar(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
@@ -1613,7 +1613,7 @@
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
-/* get the unacked counter on a client connexion */
+/* get the unacked counter on a client connection */
static int
smp_fetch_fc_unacked(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
@@ -1622,7 +1622,7 @@
return 1;
}
-/* get the sacked counter on a client connexion */
+/* get the sacked counter on a client connection */
static int
smp_fetch_fc_sacked(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
@@ -1631,7 +1631,7 @@
return 1;
}
-/* get the lost counter on a client connexion */
+/* get the lost counter on a client connection */
static int
smp_fetch_fc_lost(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
@@ -1649,7 +1649,7 @@
return 1;
}
-/* get the fackets counter on a client connexion */
+/* get the fackets counter on a client connection */
static int
smp_fetch_fc_fackets(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
@@ -1658,7 +1658,7 @@
return 1;
}
-/* get the reordering counter on a client connexion */
+/* get the reordering counter on a client connection */
static int
smp_fetch_fc_reordering(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
diff --git a/src/proto_uxst.c b/src/proto_uxst.c
index 89f4b2f..700b91d 100644
--- a/src/proto_uxst.c
+++ b/src/proto_uxst.c
@@ -133,7 +133,7 @@
strlen(un1->sun_path)) == 0) {
char *after_sockname = un2->sun_path +
strlen(un1->sun_path);
- /* Make a reasonnable effort to check that
+ /* Make a reasonable effort to check that
* it is indeed a haproxy-generated temporary
* name, it's not perfect, but probably good enough.
*/
@@ -332,7 +332,7 @@
}
/* Point of no return: we are ready, we'll switch the sockets. We don't
- * fear loosing the socket <path> because we have a copy of it in
+ * fear losing the socket <path> because we have a copy of it in
* backname. Abstract sockets are not renamed.
*/
if (!ext && path[0] && rename(tempname, path) < 0) {
diff --git a/src/proxy.c b/src/proxy.c
index 52f0c9d..6aa5629 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -1476,7 +1476,7 @@
else if (IS_HTX_STRM(s) && be->mode != PR_MODE_HTTP) {
/* If a TCP backend is assgiend to an HTX stream, return
* an error. It may happens for a new stream on a
- * previously upgraded connnections. */
+ * previously upgraded connections. */
if (!(s->flags & SF_ERR_MASK))
s->flags |= SF_ERR_INTERNAL;
return 0;
@@ -1593,7 +1593,7 @@
* default. This avoids the common mistake consisting in setting maxconn only
* in the global section and discovering the hard way that it doesn't propagate
* through the frontends. These values are also propagated through the various
- * targetted backends, whose fullconn is finally calculated if not yet set.
+ * targeted backends, whose fullconn is finally calculated if not yet set.
*/
void proxy_adjust_all_maxconn()
{
diff --git a/src/sink.c b/src/sink.c
index a8fd018..e3eac2b 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -317,7 +317,7 @@
return ring_attach_cli(sink->ctx.ring, appctx);
}
-/* Pre-configures a ring proxy to emmit connections */
+/* Pre-configures a ring proxy to emit connections */
void sink_setup_proxy(struct proxy *px)
{
px->last_change = now.tv_sec;
@@ -347,7 +347,7 @@
size_t len, cnt, ofs;
int ret = 0;
- /* if stopping was requested, close immediatly */
+ /* if stopping was requested, close immediately */
if (unlikely(stopping))
goto close;
@@ -487,7 +487,7 @@
int ret = 0;
char *p;
- /* if stopping was requested, close immediatly */
+ /* if stopping was requested, close immediately */
if (unlikely(stopping))
goto close;
@@ -1054,7 +1054,7 @@
if (logsrv->type == LOG_TARGET_BUFFER) {
sink = sink_find(logsrv->ring_name);
if (!sink || sink->type != SINK_TYPE_BUFFER) {
- ha_alert("global log server uses unkown ring named '%s'.\n", logsrv->ring_name);
+ ha_alert("global log server uses unknown ring named '%s'.\n", logsrv->ring_name);
err_code |= ERR_ALERT | ERR_FATAL;
}
logsrv->sink = sink;
@@ -1066,7 +1066,7 @@
if (logsrv->type == LOG_TARGET_BUFFER) {
sink = sink_find(logsrv->ring_name);
if (!sink || sink->type != SINK_TYPE_BUFFER) {
- ha_alert("proxy '%s' log server uses unkown ring named '%s'.\n", px->id, logsrv->ring_name);
+ ha_alert("proxy '%s' log server uses unknown ring named '%s'.\n", px->id, logsrv->ring_name);
err_code |= ERR_ALERT | ERR_FATAL;
}
logsrv->sink = sink;
diff --git a/src/stick_table.c b/src/stick_table.c
index 3ddb668..121ad07 100644
--- a/src/stick_table.c
+++ b/src/stick_table.c
@@ -2183,7 +2183,7 @@
* the sc_* and sc[0-9]_* forms, an optional table argument may be
* passed. When present, the currently tracked key is then looked up
* in the specified table instead of the current table. The purpose is
- * to be able to convery multiple values per key (eg: have gpc0 from
+ * to be able to convert multiple values per key (eg: have gpc0 from
* multiple tables). <strm> is allowed to be NULL, in which case only
* the session will be consulted.
*/
diff --git a/src/tcpcheck.c b/src/tcpcheck.c
index 893c225..12d7451 100644
--- a/src/tcpcheck.c
+++ b/src/tcpcheck.c
@@ -3388,9 +3388,9 @@
/* the implicit send rule coming from an "option httpchk" line must be
* merged with the first explici http-check send rule, if
- * any. Depdending the declaration order some tests are required.
+ * any. Depending on the declaration order some tests are required.
*
- * Some tests is also required for other kinds of http-check rules to be
+ * Some tests are also required for other kinds of http-check rules to be
* sure the ruleset remains valid.
*/