CLEANUP: assorted typo fixes in the code and comments

This is 10th iteration of typo fixes
This commit is contained in:
Ilya Shipitsin 2020-06-21 21:42:57 +05:00 committed by Willy Tarreau
parent 11057a3590
commit 47d17182f4
23 changed files with 62 additions and 62 deletions

View File

@ -31,7 +31,7 @@ backend TransparentBack_http
# 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 @@ backend TransparentBack_http
# 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
#

View File

@ -31,7 +31,7 @@ frontend TheFrontend
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)

View File

@ -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.
*

View File

@ -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>
*

View File

@ -116,7 +116,7 @@ enum tcpcheck_rule_type {
#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 */

View File

@ -568,12 +568,12 @@ char *my_strndup(const char *src, int n);
*/
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);

View File

@ -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) ( \

View File

@ -242,7 +242,7 @@ client c3h1 -connect ${h1_feh1_sock} {
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" \

View File

@ -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

View File

@ -62,7 +62,7 @@ static struct ist fcgi_param_name(char *dst, const struct ist name)
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)

View File

@ -33,7 +33,7 @@ int h1_parse_cont_len_header(struct h1m *h1m, struct ist *value)
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 @@ void h1_parse_xfer_enc_header(struct h1m *h1m, struct ist value)
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 @@ void h1_parse_connection_header(struct h1m *h1m, struct ist *value)
value->len = 0;
while (++word.ptr < e) {
/* skip leading delimitor and blanks */
/* skip leading delimiter and blanks */
if (HTTP_IS_LWS(*word.ptr))
continue;

View File

@ -45,7 +45,7 @@ static size_t h1_eval_htx_size(const struct ist p1, const struct ist p2, const s
/* 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 @@ static int h1_postparse_req_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx
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 @@ static int h1_postparse_res_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx
}
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 @@ static int h1_postparse_res_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx
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 @@ int h1_format_htx_stline(const struct htx_sl *sl, struct buffer *chk)
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.
*/

View File

@ -1626,7 +1626,7 @@ struct http_reply *http_parse_http_reply(const char **args, int *orig_arg, struc
}
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 @@ static int post_check_errors()
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;

View File

@ -198,13 +198,13 @@ static struct htx_blk *htx_reserve_nxblk(struct htx *htx, uint32_t blksz)
/* 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 @@ struct htx_blk *htx_remove_blk(struct htx *htx, struct htx_blk *blk)
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 @@ struct htx_blk *htx_remove_blk(struct htx *htx, struct htx_blk *blk)
/* 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 @@ void htx_truncate(struct htx *htx, uint32_t offset)
/* 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 @@ struct htx_ret htx_drain(struct htx *htx, uint32_t count)
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 @@ struct htx_blk *htx_replace_blk_value(struct htx *htx, struct htx_blk *blk,
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 @@ struct htx_ret htx_xfer_blks(struct htx *dst, struct htx *src, uint32_t count,
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 @@ struct htx_blk *htx_replace_header(struct htx *htx, struct htx_blk *blk,
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 @@ struct htx_blk *htx_add_trailer(struct htx *htx, const struct ist name,
}
/* 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 @@ struct htx_blk *htx_add_all_headers(struct htx *htx, const struct http_hdr *hdrs
}
/* 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)
{

View File

@ -108,7 +108,7 @@ struct h1s {
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 @@ static const struct cs_info *h1_get_cs_info(struct conn_stream *cs)
/*
* 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.

View File

@ -1901,7 +1901,7 @@ int pat_ref_append(struct pat_ref *ref, char *pattern, char *sample, int line)
/* 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 @@ struct pattern_expr *pattern_new_expr(struct pattern_head *head, struct pat_ref
* | `------------------------ 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 @@ int pat_ref_read_from_file_smp(struct pat_ref *ref, const char *filename, char *
filename, strerror(errno));
goto out_close;
}
/* succes */
/* success */
ret = 1;
out_close:

View File

@ -86,7 +86,7 @@ struct pool_head *create_pool(char *name, unsigned int size, unsigned int flags)
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) {

View File

@ -1583,7 +1583,7 @@ static inline int get_tcp_info(const struct arg *args, struct sample *smp,
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 @@ smp_fetch_fc_rtt(const struct arg *args, struct sample *smp, const char *kw, voi
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 @@ smp_fetch_fc_rttvar(const struct arg *args, struct sample *smp, const char *kw,
#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 @@ smp_fetch_fc_unacked(const struct arg *args, struct sample *smp, const char *kw,
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 @@ smp_fetch_fc_sacked(const struct arg *args, struct sample *smp, const char *kw,
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 @@ smp_fetch_fc_retrans(const struct arg *args, struct sample *smp, const char *kw,
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 @@ smp_fetch_fc_fackets(const struct arg *args, struct sample *smp, const char *kw,
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)
{

View File

@ -133,7 +133,7 @@ static int uxst_find_compatible_fd(struct listener *l)
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 @@ static int uxst_bind_listener(struct listener *listener, char *errmsg, int errle
}
/* 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) {

View File

@ -1476,7 +1476,7 @@ int stream_set_backend(struct stream *s, struct proxy *be)
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 @@ void proxy_capture_error(struct proxy *proxy, int is_back,
* 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()
{

View File

@ -317,7 +317,7 @@ static int cli_parse_show_events(char **args, char *payload, struct appctx *appc
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 @@ static void sink_forward_io_handler(struct appctx *appctx)
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 @@ static void sink_forward_oc_io_handler(struct appctx *appctx)
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 @@ int post_sink_resolve()
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 @@ int post_sink_resolve()
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;

View File

@ -2183,7 +2183,7 @@ smp_fetch_table_avl(const struct arg *args, struct sample *smp, const char *kw,
* 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.
*/

View File

@ -3388,9 +3388,9 @@ int tcpcheck_add_http_rule(struct tcpcheck_rule *chk, struct tcpcheck_rules *rul
/* 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.
*/