Hello, another round of speling improvements - whitelist improved, code and documentation fixes are split into separate patches.
Ilya
From aa26012307f603baa497b8be9d6a6d5d6029c54b Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin <[email protected]> Date: Mon, 21 Dec 2020 01:16:17 +0500 Subject: [PATCH 2/3] CLEANUP: assorted typo fixes in the code and comments This is 13n iteration of typo fixes --- contrib/opentracing/README-pool | 2 +- include/haproxy/fix.h | 2 +- include/haproxy/http_ana-t.h | 2 +- include/haproxy/htx-t.h | 2 +- include/haproxy/pattern.h | 2 +- reg-tests/log/log_uri.vtc | 2 +- reg-tests/ssl/ssl_simple_crt-list.vtc | 2 +- src/cache.c | 8 ++++---- src/fix.c | 2 +- src/log.c | 2 +- src/mqtt.c | 4 ++-- src/mux_fcgi.c | 2 +- src/mux_h1.c | 6 +++--- src/sample.c | 4 ++-- src/server.c | 2 +- src/stats.c | 2 +- 16 files changed, 23 insertions(+), 23 deletions(-) diff --git a/contrib/opentracing/README-pool b/contrib/opentracing/README-pool index 09a6c156a..8164b04de 100644 --- a/contrib/opentracing/README-pool +++ b/contrib/opentracing/README-pool @@ -16,7 +16,7 @@ By defining individual definitions in file include/config.h, it is possible to switch individual pools on / off. If a particular pool is not used, memory is used in a 'normal' way instead, using malloc()/free() functions. -This is made only from the aspect of debuging the program, i.e. comparing the +This is made only from the aspect of debugging the program, i.e. comparing the speed of operation using different methods of working with memory. In general, it would be better to use memory pools, due to less fragmentation diff --git a/include/haproxy/fix.h b/include/haproxy/fix.h index 1d242e7ff..4b5928204 100644 --- a/include/haproxy/fix.h +++ b/include/haproxy/fix.h @@ -32,7 +32,7 @@ int fix_validate_message(const struct ist msg); struct ist fix_tag_value(const struct ist msg, unsigned int tagid); /* - * Return the FIX version string (one of FIX_X_Y macros) correspoding to + * Return the FIX version string (one of FIX_X_Y macros) corresponding to * <str> or IST_NULL if not found. */ static inline struct ist fix_version(const struct ist str) diff --git a/include/haproxy/http_ana-t.h b/include/haproxy/http_ana-t.h index 4dce43d47..f41a593af 100644 --- a/include/haproxy/http_ana-t.h +++ b/include/haproxy/http_ana-t.h @@ -64,7 +64,7 @@ #define TX_CON_WANT_TUN 0x00008000 /* Will be a tunnel (CONNECT or 101-Switching-Protocol) */ -/* unsued 0x00010000 */ +/* unused 0x00010000 */ #define TX_USE_PX_CONN 0x00020000 /* Use "Proxy-Connection" instead of "Connection" */ diff --git a/include/haproxy/htx-t.h b/include/haproxy/htx-t.h index 1b990260f..fb015752f 100644 --- a/include/haproxy/htx-t.h +++ b/include/haproxy/htx-t.h @@ -143,7 +143,7 @@ #define HTX_FL_NONE 0x00000000 #define HTX_FL_PARSING_ERROR 0x00000001 /* Set when a parsing error occurred */ #define HTX_FL_PROCESSING_ERROR 0x00000002 /* Set when a processing error occurred */ -/* 0x00000004 unsused */ +/* 0x00000004 unused */ #define HTX_FL_PROXY_RESP 0x00000008 /* Set when the response was generated by HAProxy */ #define HTX_FL_EOI 0x00000010 /* Set when end-of-input is reached from the HTX point of view * (at worst, on the EOM block is missing) diff --git a/include/haproxy/pattern.h b/include/haproxy/pattern.h index 726dac83e..cfaadcafe 100644 --- a/include/haproxy/pattern.h +++ b/include/haproxy/pattern.h @@ -78,7 +78,7 @@ int pat_idx_tree_pfx(struct pattern_expr *expr, struct pattern *pat, char **err) /* * * The following function deletes all patterns related to reference pattern - * element <elt> in pattern refernce <ref>. + * element <elt> in pattern reference <ref>. * */ void pat_delete_gen(struct pat_ref *ref, struct pat_ref_elt *elt); diff --git a/reg-tests/log/log_uri.vtc b/reg-tests/log/log_uri.vtc index 934a3ef10..00f0553d3 100644 --- a/reg-tests/log/log_uri.vtc +++ b/reg-tests/log/log_uri.vtc @@ -1,4 +1,4 @@ -varnishtest "Verify logging of relative/aboslute URI path" +varnishtest "Verify logging of relative/absolute URI path" feature ignore_unknown_macro server s1 { diff --git a/reg-tests/ssl/ssl_simple_crt-list.vtc b/reg-tests/ssl/ssl_simple_crt-list.vtc index 76605e352..d3353a129 100644 --- a/reg-tests/ssl/ssl_simple_crt-list.vtc +++ b/reg-tests/ssl/ssl_simple_crt-list.vtc @@ -1,6 +1,6 @@ #REGTEST_TYPE=bug varnishtest "Test for the bug #940" -# Test that the SNI are correcly inserted with the same file multiple times. +# Test that the SNI are correctly inserted with the same file multiple times. #REQUIRE_VERSION=2.2 #REQUIRE_OPTIONS=OPENSSL diff --git a/src/cache.c b/src/cache.c index a833c044f..705ed446c 100644 --- a/src/cache.c +++ b/src/cache.c @@ -77,7 +77,7 @@ typedef int(*http_header_normalizer)(struct ist value, char *buf, unsigned int * struct vary_hashing_information { struct ist hdr_name; /* Header name */ - enum vary_header_bit value; /* Bit repesenting the header in a vary signature */ + enum vary_header_bit value; /* Bit representing the header in a vary signature */ unsigned int hash_length; /* Size of the sub hash for this header's value */ http_header_normalizer norm_fn; /* Normalization function */ }; @@ -839,7 +839,7 @@ static time_t get_last_modified_time(struct htx *htx) /* * Checks the vary header's value. The headers on which vary should be applied - * must be explicitely supported in the vary_information array (see cache.c). If + * must be explicitly supported in the vary_information array (see cache.c). If * any other header is mentioned, we won't store the response. * Returns 1 if Vary-based storage can work, 0 otherwise. */ @@ -923,7 +923,7 @@ enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px, break; default: /* Any unsafe method */ - /* Discard any corresponding entry in case of sucessful + /* Discard any corresponding entry in case of successful * unsafe request (such as PUT, POST or DELETE). */ shctx_lock(shctx); @@ -1650,7 +1650,7 @@ enum act_return http_action_req_cache_use(struct act_rule *rule, struct proxy *p http_check_request_for_cacheability(s, &s->req); /* The request's hash has to be calculated for all requests, even POSTs - * or PUTs for instance because RFC7234 specifies that a sucessful + * or PUTs for instance because RFC7234 specifies that a successful * "unsafe" method on a stored resource must invalidate it * (see RFC7234#4.4). */ if (!sha1_hosturi(s)) diff --git a/src/fix.c b/src/fix.c index 82af1c0b9..3ad3f2e8b 100644 --- a/src/fix.c +++ b/src/fix.c @@ -124,7 +124,7 @@ int fix_validate_message(const struct ist msg) ret = FIX_NEED_MORE_DATA; goto end; } - /* empty tag or empty value are forbbiden */ + /* empty tag or empty value are forbidden */ if (istptr(parser) == istptr(value) ||!istlen(value)) goto end; diff --git a/src/log.c b/src/log.c index 59d68a93c..632e8bd80 100644 --- a/src/log.c +++ b/src/log.c @@ -1483,7 +1483,7 @@ struct ist *build_log_header(enum log_fmt format, int level, int facility, } else if (metadata[LOG_META_TAG].len) { /* Tag is present but no hostname, we should - * consider we try to emmit a local log + * consider we try to emit a local log * in legacy format (analog to RFC3164 but * with stripped hostname). */ diff --git a/src/mqtt.c b/src/mqtt.c index c906fd43c..7679cbae6 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -326,7 +326,7 @@ static inline size_t mqtt_uint2str(struct buffer *buf, uint32_t i) } /* Extracts the value of a <fieldname_id> of type <type> from a given MQTT - * message <msg>. IST_NULL is returned if an error occured while parsing or if + * message <msg>. IST_NULL is returned if an error occurred while parsing or if * the field could not be found. If more data are required, the message with a * length set to 0 is returned. If the field is found, the response is returned * as a struct ist. @@ -858,7 +858,7 @@ static int mqtt_parse_connect(struct ist parser, struct mqtt_pkt *mpkt) /* parsing payload * - * Content of payload is realted to flags parsed above and the field order is pre-defined: + * Content of payload is related to flags parsed above and the field order is pre-defined: * Client Identifier, Will Topic, Will Message, User Name, Password */ /* read client identifier */ diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index 2c2611bdb..9998710f0 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -1147,7 +1147,7 @@ static void fcgi_strm_wake_one_stream(struct fcgi_strm *fstrm) if (fcgi_conn_read0_pending(fconn)) { if (fstrm->state == FCGI_SS_OPEN) { fstrm->state = FCGI_SS_HREM; - TRACE_STATE("swtiching to HREM", FCGI_EV_STRM_WAKE|FCGI_EV_FSTRM_END, fconn->conn, fstrm); + TRACE_STATE("switching to HREM", FCGI_EV_STRM_WAKE|FCGI_EV_FSTRM_END, fconn->conn, fstrm); } else if (fstrm->state == FCGI_SS_HLOC) fcgi_strm_close(fstrm); diff --git a/src/mux_h1.c b/src/mux_h1.c index 65581589d..81b0e0e30 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -55,13 +55,13 @@ /* 0x00002000 - 0x00008000 unused */ #define H1C_F_WAIT_OPPOSITE 0x00010000 /* Don't read more data for now, waiting sync with opposite side */ -#define H1C_F_WANT_SPLICE 0x00020000 /* Don't read into a bufffer because we want to use or we are using splicing */ +#define H1C_F_WANT_SPLICE 0x00020000 /* Don't read into a buffer because we want to use or we are using splicing */ #define H1C_F_ERR_PENDING 0x00040000 /* Send an error and close the connection ASAP (implies H1C_F_ST_ERROR) */ #define H1C_F_WAIT_NEXT_REQ 0x00080000 /* waiting for the next request to start, use keep-alive timeout */ #define H1C_F_UPG_H2C 0x00100000 /* set if an upgrade to h2 should be done */ #define H1C_F_CO_MSG_MORE 0x00200000 /* set if CO_SFL_MSG_MORE must be set when calling xprt->snd_buf() */ #define H1C_F_CO_STREAMER 0x00400000 /* set if CO_SFL_STREAMER must be set when calling xprt->snd_buf() */ -/* 0x00800000 - 0x40000000 unsued*/ +/* 0x00800000 - 0x40000000 unused */ #define H1C_F_IS_BACK 0x80000000 /* Set on outgoing connection */ @@ -69,7 +69,7 @@ * H1 Stream flags (32 bits) */ #define H1S_F_NONE 0x00000000 -/* 0x00000001..0x00000004 unsued */ +/* 0x00000001..0x00000004 unused */ #define H1S_F_REOS 0x00000008 /* End of input stream seen even if not delivered yet */ #define H1S_F_WANT_KAL 0x00000010 #define H1S_F_WANT_TUN 0x00000020 diff --git a/src/sample.c b/src/sample.c index abf820bc7..d1941ce83 100644 --- a/src/sample.c +++ b/src/sample.c @@ -3273,7 +3273,7 @@ static int sample_conv_fix_value_check(struct arg *args, struct sample_conv *con * Checks that a buffer contains a valid FIX message * * Return 1 if the check could be run, 0 if not. - * The result of the analyse itsef is stored in <smp> as a boolean + * The result of the analyse itself is stored in <smp> as a boolean */ static int sample_conv_fix_is_valid(const struct arg *arg_p, struct sample *smp, void *private) { @@ -3334,7 +3334,7 @@ static int sample_conv_mqtt_field_value(const struct arg *arg_p, struct sample * * this function checks the "mqtt_field_value" converter configuration. * It expects a known packet type name or ID and a field name, in this order * - * Args[0] will be turned into a MQTT_CPT_* value for direct maching when parsing + * Args[0] will be turned into a MQTT_CPT_* value for direct matching when parsing * a packet. */ static int sample_conv_mqtt_field_value_check(struct arg *args, struct sample_conv *conv, diff --git a/src/server.c b/src/server.c index 3a3ccc672..15d88de8c 100644 --- a/src/server.c +++ b/src/server.c @@ -2952,7 +2952,7 @@ static void srv_update_state(struct server *srv, int version, char **params) srv->svc_port = port; #ifdef USE_OPENSSL - /* configure ssl if connection has been initated at startup */ + /* configure ssl if connection has been initiated at startup */ if (srv->ssl_ctx.ctx != NULL) ssl_sock_set_srv(srv, use_ssl); #endif diff --git a/src/stats.c b/src/stats.c index 3f314440d..f597c1073 100644 --- a/src/stats.c +++ b/src/stats.c @@ -3947,7 +3947,7 @@ static int stats_dump_info_to_buffer(struct stream_interface *si) * It returns 0 as long as it does not complete, non-zero upon completion. * No state is used. * - * Integer values bouned to the range [-(2**53)+1, (2**53)-1] as + * Integer values bounded to the range [-(2**53)+1, (2**53)-1] as * per the recommendation for interoperable integers in section 6 of RFC 7159. */ static void stats_dump_json_schema(struct buffer *out) -- 2.28.0
From c0811d0580d7ff5f5650e17afbc5ecf9d173f772 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin <[email protected]> Date: Mon, 21 Dec 2020 01:03:12 +0500 Subject: [PATCH 1/3] CI: codespell: whitelist "te" and "nd" words --- .github/workflows/codespell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index c706c4e3d..c75259147 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -14,4 +14,4 @@ jobs: - name: install prerequisites run: sudo pip install codespell - name: check - run: codespell -c -q 2 --ignore-words-list ist,hist,wan,ca,cas,que,ans --skip="CHANGELOG,*.fig,*.pem" + run: codespell -c -q 2 --ignore-words-list ist,hist,wan,ca,cas,que,ans,te,nd --skip="CHANGELOG,*.fig,*.pem" -- 2.28.0
From 43674b1c749a53fc1103864cad503915fe4b6461 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin <[email protected]> Date: Mon, 21 Dec 2020 01:22:40 +0500 Subject: [PATCH 3/3] DOC: assorted typo fixes in the documentation This is another round of cleanups in various docs --- doc/coding-style.txt | 4 ++-- doc/configuration.txt | 14 +++++++------- doc/lua-api/index.rst | 2 +- doc/management.txt | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/coding-style.txt b/doc/coding-style.txt index 87cc47742..59f0991fc 100644 --- a/doc/coding-style.txt +++ b/doc/coding-style.txt @@ -1450,7 +1450,7 @@ calls on casted strings. Do not do that! It will inevitably lead to someone getting caught passing a constant string that will make the process crash (if lucky). Document the expectations, indicate that all arguments must be freeable and that the caller must be capable of strdup(), and make your function support -NULLs and docuemnt it (so that callers can deal with a failing strdup() on +NULLs and document it (so that callers can deal with a failing strdup() on allocation error). One valid alternative is to use a secondary channel to indicate whether the @@ -1549,7 +1549,7 @@ There are a few rules to respect in order to do this: in the early days of hparoxy, size_t is now heavily used and known to work everywhere. And do not perform the operations on the pointers, only on the integer types (and cast back again). Some compilers such as gcc are - extremely picky about this and wil often emit wrong code when they see + extremely picky about this and will often emit wrong code when they see equality conditions they believe is impossible and decide to optimize them away. diff --git a/doc/configuration.txt b/doc/configuration.txt index 32df1cac3..ff326e7dc 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -606,7 +606,7 @@ own quotes. The keyword argument parser is exactly the same as the top-level one regarding quotes, except that is will not make special cases of backslashes. But what is -not always obvious is that the delimitors used inside must first be escaped or +not always obvious is that the delimiters used inside must first be escaped or quoted so that they are not resolved at the top level. Let's take this example making use of the "regsub" converter which takes 3 @@ -659,7 +659,7 @@ the second level: arg2=blah ___________/ / arg3=g _______________/ -Another approch consists in using single quotes outside the whole string and +Another approach consists in using single quotes outside the whole string and double quotes inside (so that the double quotes are not stripped again): http-request set-path '%[path,regsub("(foo|bar)",blah,g)]' @@ -683,7 +683,7 @@ thus single quotes are preferred (or double escaping). Example: arg2=my/\1 ________________/ / arg3 ______________________/ -Remember that backslahes are not escape characters withing single quotes and +Remember that backslahes are not escape characters within single quotes and that the whole word3 above is already protected against them using the single quotes. Conversely, if double quotes had been used around the whole expression, single the dollar character and the backslashes would have been resolved at top @@ -8639,7 +8639,7 @@ no option nolinger This option may be used both on frontends and backends, depending on the side where it is required. Use it on the frontend for clients, and on the backend for servers. While this option is technically supported in "defaults" - sections, it must really not be used there as it risks to accidently + sections, it must really not be used there as it risks to accidentally propagate to sections that must no use it and to cause problems there. If this option has been enabled in a "defaults" section, it can be disabled @@ -15488,7 +15488,7 @@ fix_is_valid - checks that all tag IDs and values are not empty and the tags IDs are well numeric - - checks the BeginString tag is the first tag with a valide FIX version + - checks the BeginString tag is the first tag with a valid FIX version - checks the BodyLength tag is the second one with the right body length - checks the MstType tag is the third tag. - checks that last tag in the message is the CheckSum tag with a valid @@ -17611,7 +17611,7 @@ ssl_c_chain_der : binary Returns the DER formatted chain certificate presented by the client when the incoming connection was made over an SSL/TLS transport layer. When used for an ACL, the value(s) to match against can be passed in hexadecimal form. One - can parse the result with any lib accepting ASN.1 DER data. It currentlly + can parse the result with any lib accepting ASN.1 DER data. It currently does not support resumed sessions. ssl_c_der : binary @@ -17987,7 +17987,7 @@ ssl_s_chain_der : binary Returns the DER formatted chain certificate presented by the server when the outgoing connection was made over an SSL/TLS transport layer. When used for an ACL, the value(s) to match against can be passed in hexadecimal form. One - can parse the result with any lib accepting ASN.1 DER data. It currentlly + can parse the result with any lib accepting ASN.1 DER data. It currently does not support resumed sessions. ssl_s_key_alg : string diff --git a/doc/lua-api/index.rst b/doc/lua-api/index.rst index b6b9809e8..fb7eb0978 100644 --- a/doc/lua-api/index.rst +++ b/doc/lua-api/index.rst @@ -2687,7 +2687,7 @@ StickTable class .. js:function:: StickTable.info() Returns stick table attributes as a Lua table. See HAProxy documentation for - "stick-table" for canonical info, or check out example bellow. + "stick-table" for canonical info, or check out example below. :returns: Lua table diff --git a/doc/management.txt b/doc/management.txt index b1ca95185..36e47a405 100644 --- a/doc/management.txt +++ b/doc/management.txt @@ -944,7 +944,7 @@ CSV output format for monitoring tools. The same format is provided on the Unix socket. Statistics are regroup in categories labelled as domains, corresponding to the -multiple components of HAProxy. There are two domains avaiable: proxy and dns. +multiple components of HAProxy. There are two domains available: proxy and dns. If not specified, the proxy domain is selected. Note that only the proxy statistics are printed on the HTTP page. @@ -1525,7 +1525,7 @@ commit ssl cert <filename> committed, it is destroyed. In the case of a new certificate (after a "new ssl cert" and in a "Unused" - state in "show ssl cert"), the certificate will be commited in a certificate + state in "show ssl cert"), the certificate will be committed in a certificate storage, but it won't be used anywhere in haproxy. To use it and generate its SNIs you will need to add it to a crt-list or a directory with "add ssl crt-list". -- 2.28.0

