]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: assorted typo fixes in the code and comments
authorIlya Shipitsin <chipitsine@gmail.com>
Thu, 2 Apr 2020 10:25:26 +0000 (15:25 +0500)
committerWilly Tarreau <w@1wt.eu>
Thu, 2 Apr 2020 14:25:45 +0000 (16:25 +0200)
This is sixth iteration of typo fixes

contrib/debug/flags.c
src/acl.c
src/cache.c
src/cfgparse.c
src/flt_spoe.c
src/h2.c
src/http_ana.c
src/lb_map.c
src/listener.c
src/mux_fcgi.c
src/stream_interface.c

index d966650ee265a654b7aacbb54dd5c215dec4f9f5..ca7584e32d38552485b7238573810720d3ea0dad 100644 (file)
@@ -434,7 +434,7 @@ int main(int argc, char **argv)
                        if (!value)
                                break;
 
-                       /* skip common leading delimitors that slip from copy-paste */
+                       /* skip common leading delimiters that slip from copy-paste */
                        while (*value == ' ' || *value == '\t' || *value == ':' || *value == '=')
                                value++;
 
index 1e32271bea250a9cad5fa0c199fbc9e0131d5c07..f3d7af789ecc4f9c28bfcf39ff8eb4e666fb7052 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -503,7 +503,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
                 expr->kw, file, line);
        trash.area[trash.size - 1] = '\0';
 
-       /* Create new patern reference. */
+       /* Create new pattern reference. */
        ref = pat_ref_newid(unique_id, trash.area, PAT_REF_ACL);
        if (!ref) {
                memprintf(err, "memory error");
@@ -521,7 +521,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
 
                /* Compatibility layer. Each pattern can parse only one string per pattern,
                 * but the pat_parser_int() and pat_parse_dotted_ver() parsers were need
-                * optionnaly two operators. The first operator is the match method: eq,
+                * optionally two operators. The first operator is the match method: eq,
                 * le, lt, ge and gt. pat_parse_int() and pat_parse_dotted_ver() functions
                 * can have a compatibility syntax based on ranges:
                 *
index 7d53b2d5d8c746435d839b1221eebee5b40fa9a3..3b248ef465c207f48fb912d6543fd1b2ee0e0a7b 100644 (file)
@@ -520,7 +520,7 @@ static void cache_free_blocks(struct shared_block *first, struct shared_block *b
 }
 
 /*
- * This fonction will store the headers of the response in a buffer and then
+ * This function will store the headers of the response in a buffer and then
  * register a filter to store the data
  */
 enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px,
@@ -822,7 +822,7 @@ static size_t htx_cache_dump_msg(struct appctx *appctx, struct htx *htx, unsigne
                        goto add_data_blk;
                }
 
-               /* Get info of the next HTX block. May be splitted on 2 shblk */
+               /* Get info of the next HTX block. May be split on 2 shblk */
                sz = MIN(4, shctx->block_size - offset);
                memcpy((char *)&info, (const char *)shblk->data + offset, sz);
                offset += sz;
@@ -888,7 +888,7 @@ static void http_cache_io_handler(struct appctx *appctx)
        if (unlikely(si->state == SI_ST_DIS || si->state == SI_ST_CLO))
                goto out;
 
-       /* Check if the input buffer is avalaible. */
+       /* Check if the input buffer is available. */
        if (!b_size(&res->buf)) {
                si_rx_room_blk(si);
                goto out;
index 9b4a0be37936738797b7f36b47f682ea268e97af..993496192ac19420c1a5950081b2a7e0c3ebfb57 100644 (file)
@@ -91,7 +91,7 @@
  * Check RFC 2246 (TLSv1.0) sections A.3 and A.4 for details.
  */
 const char sslv3_client_hello_pkt[] = {
-       "\x16"                /* ContentType         : 0x16 = Hanshake           */
+       "\x16"                /* ContentType         : 0x16 = Handshake          */
        "\x03\x00"            /* ProtocolVersion     : 0x0300 = SSLv3            */
        "\x00\x79"            /* ContentLength       : 0x79 bytes after this one */
        "\x01"                /* HanshakeType        : 0x01 = CLIENT HELLO       */
@@ -3830,7 +3830,7 @@ out_uri_auth_compat:
                         * maximize the work at once, but in multi-process we want to keep
                         * some fairness between processes, so we target half of the max
                         * number of events to be balanced over all the processes the proxy
-                        * is bound to. Rememeber that maxaccept = -1 must be kept as it is
+                        * is bound to. Remember that maxaccept = -1 must be kept as it is
                         * used to disable the limit.
                         */
                        if (listener->maxaccept > 0 && nbproc > 1) {
index 57c22464475b968939db784ecef420da5fd7ccf0..9db2baa15dcf54ea72f930fac0d7468dbadc63b4 100644 (file)
@@ -252,7 +252,7 @@ static const char *spoe_appctx_state_str[SPOE_APPCTX_ST_END+1] = {
 #endif
 
 /* Used to generates a unique id for an engine. On success, it returns a
- * allocated string. So it is the caller's reponsibility to release it. If the
+ * allocated string. So it is the caller's responsibility to release it. If the
  * allocation failed, it returns NULL. */
 static char *
 generate_pseudo_uuid()
@@ -435,7 +435,7 @@ spoe_prepare_hahello_frame(struct appctx *appctx, char *frame, size_t size)
        if (spoe_encode_buffer(chk->area, chk->data, &p, end) == -1)
                goto too_big;
 
-       /* (optionnal) "engine-id" K/V item, if present */
+       /* (optional) "engine-id" K/V item, if present */
        if (agent != NULL && agent->rt[tid].engine_id != NULL) {
                sz = SLEN(ENGINE_ID_KEY);
                if (spoe_encode_buffer(ENGINE_ID_KEY, sz, &p, end) == -1)
@@ -1125,7 +1125,7 @@ spoe_handle_healthcheck_response(char *frame, size_t size, char *err, int errlen
 }
 
 /* Send a SPOE frame to an agent. It returns -1 when an error occurred, 0 when
- * the frame can be ignored, 1 to retry later, and the frame legnth on
+ * the frame can be ignored, 1 to retry later, and the frame length on
  * success. */
 static int
 spoe_send_frame(struct appctx *appctx, char *buf, size_t framesz)
@@ -2985,7 +2985,7 @@ spoe_init(struct proxy *px, struct flt_conf *fconf)
        return 0;
 }
 
-/* Free ressources allocated by the SPOE filter. */
+/* Free resources allocated by the SPOE filter. */
 static void
 spoe_deinit(struct proxy *px, struct flt_conf *fconf)
 {
index fa118689a9d3a3555201146291322983f87fad7f..53cb0d34a21cd3d11258bb5c9192113e2d2b4126 100644 (file)
--- a/src/h2.c
+++ b/src/h2.c
@@ -80,7 +80,7 @@ int h2_parse_cont_len_header(unsigned int *msgf, struct ist *value, unsigned lon
        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;
 
@@ -495,7 +495,7 @@ int h2_make_htx_request(struct http_hdr *list, struct htx *htx, unsigned int *ms
        /* now send the end of headers marker */
        htx_add_endof(htx, HTX_BLK_EOH);
 
-       /* 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;
 
        ret = 1;
@@ -695,7 +695,7 @@ int h2_make_htx_response(struct http_hdr *list, struct htx *htx, unsigned int *m
        /* now send the end of headers marker */
        htx_add_endof(htx, HTX_BLK_EOH);
 
-       /* 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;
 
        ret = 1;
index f5a5d0de5aa36725049409b104b7e258790f08eb..dd513e99461322494fc1cea58288e4ea1d4798b7 100644 (file)
@@ -622,7 +622,7 @@ int http_process_req_common(struct stream *s, struct channel *req, int an_bit, s
         * points will have set, if any.
         */
        req->analyse_exp = TICK_ETERNITY;
- done_without_exp: /* done with this analyser, but dont reset the analyse_exp. */
+ done_without_exp: /* done with this analyser, but don't reset the analyse_exp. */
        req->analysers &= ~an_bit;
        DBG_TRACE_LEAVE(STRM_EV_STRM_ANA|STRM_EV_HTTP_ANA, s, txn);
        return 1;
@@ -1505,7 +1505,7 @@ int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                            (!conn || conn->err_code != CO_ER_SSL_EARLY_FAILED)) {
                                /* If we arrive here, then CF_READ_ERROR was
                                 * set by si_cs_recv() because we matched a
-                                * status, overwise it would have removed
+                                * status, otherwise it would have removed
                                 * the SI_FL_L7_RETRY flag, so it's ok not
                                 * to check s->be->retry_type.
                                 */
@@ -1944,10 +1944,10 @@ int http_process_res_common(struct stream *s, struct channel *rep, int an_bit, s
         *
         * Maybe we are in resume condiion. In this case I choose the
         * "struct proxy" which contains the rule list matching the resume
-        * pointer. If none of theses "struct proxy" match, I initialise
+        * pointer. If none of these "struct proxy" match, I initialise
         * the process with the first one.
         *
-        * In fact, I check only correspondance betwwen the current list
+        * In fact, I check only correspondence between the current list
         * pointer and the ->fe rule list. If it doesn't match, I initialize
         * the loop with the ->be.
         */
@@ -3200,7 +3200,7 @@ static void http_manage_client_side_cookies(struct stream *s, struct channel *re
                 * implementations trying to do that. So let's do what servers do.
                 * Latest ietf draft forbids spaces all around. Also, earlier RFCs
                 * allowed quoted strings in values, with any possible character
-                * after a backslash, including control chars and delimitors, which
+                * after a backslash, including control chars and delimiters, which
                 * causes parsing to become ambiguous. Browsers also allow spaces
                 * within values even without quotes.
                 *
@@ -3251,7 +3251,7 @@ static void http_manage_client_side_cookies(struct stream *s, struct channel *re
                                att_end = equal;
                        }
 
-                       /* here, <equal> points to '=', a delimitor or the end. <att_end>
+                       /* here, <equal> points to '=', a delimiter or the end. <att_end>
                         * is between <att_beg> and <equal>, both may be identical.
                         */
                        /* look for end of cookie if there is an equal sign */
@@ -3264,7 +3264,7 @@ static void http_manage_client_side_cookies(struct stream *s, struct channel *re
                                /* find the end of the value, respecting quotes */
                                next = http_find_cookie_value_end(val_beg, hdr_end);
 
-                               /* make val_end point to the first white space or delimitor after the value */
+                               /* make val_end point to the first white space or delimiter after the value */
                                val_end = next;
                                while (val_end > val_beg && HTTP_IS_SPHT(*(val_end - 1)))
                                        val_end--;
@@ -3361,7 +3361,7 @@ static void http_manage_client_side_cookies(struct stream *s, struct channel *re
                                struct server *srv = s->be->srv;
                                char *delim;
 
-                               /* if we're in cookie prefix mode, we'll search the delimitor so that we
+                               /* if we're in cookie prefix mode, we'll search the delimiter so that we
                                 * have the server ID between val_beg and delim, and the original cookie between
                                 * delim+1 and val_end. Otherwise, delim==val_end :
                                 *
@@ -3661,7 +3661,7 @@ static void http_manage_server_side_cookies(struct stream *s, struct channel *re
                                att_end = equal;
                        }
 
-                       /* here, <equal> points to '=', a delimitor or the end. <att_end>
+                       /* here, <equal> points to '=', a delimiter or the end. <att_end>
                         * is between <att_beg> and <equal>, both may be identical.
                         */
 
@@ -3675,7 +3675,7 @@ static void http_manage_server_side_cookies(struct stream *s, struct channel *re
                                /* find the end of the value, respecting quotes */
                                next = http_find_cookie_value_end(val_beg, hdr_end);
 
-                               /* make val_end point to the first white space or delimitor after the value */
+                               /* make val_end point to the first white space or delimiter after the value */
                                val_end = next;
                                while (val_end > val_beg && HTTP_IS_SPHT(*(val_end - 1)))
                                        val_end--;
@@ -4303,7 +4303,7 @@ void http_perform_server_redirect(struct stream *s, struct stream_interface *si)
        channel_htx_truncate(res, htx);
 }
 
-/* This function terminates the request because it was completly analyzed or
+/* This function terminates the request because it was completely analyzed or
  * because an error was triggered during the body forwarding.
  */
 static void http_end_request(struct stream *s)
@@ -4440,7 +4440,7 @@ static void http_end_request(struct stream *s)
 }
 
 
-/* This function terminates the response because it was completly analyzed or
+/* This function terminates the response because it was completely analyzed or
  * because an error was triggered during the body forwarding.
  */
 static void http_end_response(struct stream *s)
index 245af0041d9726750c3e0e2ec7bac1461d5ea091..b6dcee907a4486b784744ab3d27a67131c6067e0 100644 (file)
@@ -99,7 +99,7 @@ void recalc_server_map(struct proxy *px)
        /* this algorithm gives priority to the first server, which means that
         * it will respect the declaration order for equivalent weights, and
         * that whatever the weights, the first server called will always be
-        * the first declared. This is an important asumption for the backup
+        * the first declared. This is an important assumption for the backup
         * case, where we want the first server only.
         */
        for (cur = px->srv; cur; cur = cur->next)
index fdd972a4216502319f45dee4c5c9b293dec1efbc..ef7567e5e9b1dd6321fd58a00491454f38d6610d 100644 (file)
@@ -49,7 +49,7 @@ static struct bind_kw_list bind_keywords = {
 struct xfer_sock_list *xfer_sock_list = NULL;
 
 /* there is one listener queue per thread so that a thread unblocking the
- * global queue can wake up listeners bound only to foreing threads by
+ * global queue can wake up listeners bound only to foreign threads by
  * moving them to the remote queues and waking up the associated tasklet.
  */
 static struct work_list *local_listener_queue;
@@ -230,7 +230,7 @@ REGISTER_CONFIG_POSTPARSER("multi-threaded accept queue", accept_queue_init);
 
 /* This function adds the specified listener's file descriptor to the polling
  * lists if it is in the LI_LISTEN state. The listener enters LI_READY or
- * LI_FULL state depending on its number of connections. In deamon mode, we
+ * LI_FULL state depending on its number of connections. In daemon mode, we
  * also support binding only the relevant processes to their respective
  * listeners. We don't do that in debug mode however.
  */
index b7afde1b87a02831b6f7bcf1ebb7e70d5193e747..b0920385faeeb3f848b6a4aececb620dca87d890 100644 (file)
@@ -712,7 +712,7 @@ static int fcgi_init(struct connection *conn, struct proxy *px, struct session *
 
        fconn->flags = FCGI_CF_NONE;
 
-       /* Retrieve usefull info from the FCGI app */
+       /* Retrieve useful info from the FCGI app */
        if (app->flags & FCGI_APP_FL_KEEP_CONN)
                fconn->flags |= FCGI_CF_KEEP_CONN;
        if (app->flags & FCGI_APP_FL_GET_VALUES)
@@ -868,7 +868,7 @@ static void fcgi_release(struct fcgi_conn *fconn)
 }
 
 
-/* Retruns true if the FCGI connection must be release */
+/* Returns true if the FCGI connection must be release */
 static inline int fcgi_conn_is_dead(struct fcgi_conn *fconn)
 {
        if (eb_is_empty(&fconn->streams_by_id) &&               /* don't close if streams exist */
@@ -1342,7 +1342,7 @@ static int fcgi_set_default_param(struct fcgi_conn *fconn, struct fcgi_strm *fst
                /* If some special characters are found in the decoded path (\n
                 * or \0), the PATH_INFO regex cannot match. This is theorically
                 * valid, but probably unexpected, to have such characters. So,
-                * to avoid any suprises, an error is triggered in this
+                * to avoid any surprises, an error is triggered in this
                 * case.
                 */
                if (istchr(path, '\n') || istchr(path, '\0'))
@@ -2312,7 +2312,7 @@ static int fcgi_strm_handle_stdout(struct fcgi_conn *fconn, struct fcgi_strm *fs
 
 /* Processes an empty STDOUT. Returns > 0 on success, 0 if it couldn't do
  * anything. It only skip the padding in fact, there is no payload for such
- * records. It makrs the end of the response.
+ * records. It marks the end of the response.
  */
 static int fcgi_strm_handle_empty_stdout(struct fcgi_conn *fconn, struct fcgi_strm *fstrm)
 {
@@ -4114,7 +4114,7 @@ static int fcgi_takeover(struct connection *conn)
 }
 
 /****************************************/
-/* MUX initialization and instanciation */
+/* MUX initialization and instantiation */
 /****************************************/
 
 /* The mux operations */
index 7bb864d529c2171c28ab59dff71ed80791d322a1..987fc016b9c07416e0f5a7bb697e2903e0d13c14 100644 (file)
@@ -1046,7 +1046,7 @@ static void stream_int_shutw_conn(struct stream_interface *si)
                        cs->flags |= CS_FL_KILL_CONN;
 
                if (si->flags & SI_FL_ERR) {
-                       /* quick close, the socket is alredy shut anyway */
+                       /* quick close, the socket is already shut anyway */
                }
                else if (si->flags & SI_FL_NOLINGER) {
                        /* unclean data-layer shutdown, typically an aborted request