]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: htx: Rename HTX_FL_EOI flag into HTX_FL_EOM
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 20 Nov 2020 16:43:16 +0000 (17:43 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 28 Jan 2021 15:37:14 +0000 (16:37 +0100)
The HTX_FL_EOI flag is not well named. For now, it is not very used. But
that will change. It will replace the EOM block. Thus, it is renamed.

contrib/prometheus-exporter/service-prometheus.c
include/haproxy/htx-t.h
include/haproxy/htx.h
src/cache.c
src/h1_htx.c
src/h2.c
src/hlua.c
src/http_ana.c
src/mux_h2.c
src/stats.c
src/tcpcheck.c

index 364d4b6d16697e2619c53700a317d19a7602a187..cfd0d996b8852f07508be9813aa6e894ca484bc3 100644 (file)
@@ -1226,7 +1226,7 @@ static void promex_appctx_handle_io(struct appctx *appctx)
 
                case PROMEX_ST_DONE:
                        /* Don't add TLR because mux-h1 will take care of it */
-                       res_htx->flags |= HTX_FL_EOI; /* no more data are expected. Only EOM remains to add now */
+                       res_htx->flags |= HTX_FL_EOM; /* no more data are expected. Only EOM remains to add now */
                        if (!htx_add_endof(res_htx, HTX_BLK_EOM)) {
                                si_rx_room_blk(si);
                                goto out;
index f14bb25e5e254cc75ed1735e0dd37a1e15e96ca4..6f0aa71ba993099f9a454ea176d1b59807d130e7 100644 (file)
 #define HTX_FL_PROCESSING_ERROR  0x00000002 /* Set when a processing error occurred */
 /* 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
+#define HTX_FL_EOM               0x00000010 /* Set when end-of-message is reached from the HTTP point of view
                                             * (at worst, on the EOM block is missing)
                                             */
 
index 5c51e5576e7db54e2d3b805e524ca6a3d05a5461..31bbcd98299176b808a8aceeaaafcd2a945d7e1d 100644 (file)
@@ -591,7 +591,7 @@ static inline int htx_is_not_empty(const struct htx *htx)
  */
 static inline int htx_expect_more(const struct htx *htx)
 {
-       return !(htx->flags & HTX_FL_EOI);
+       return !(htx->flags & HTX_FL_EOM);
 }
 
 /* Copy an HTX message stored in the buffer <msg> to <htx>. We take care to
index 3f95195a1537df311ae39394505b8b6abed42e21..0bbba7edd438c250ed2e58b3ba30113eb6304ff3 100644 (file)
@@ -1499,7 +1499,7 @@ static void http_cache_io_handler(struct appctx *appctx)
        }
 
        if (appctx->st0 == HTX_CACHE_EOM) {
-               res_htx->flags |= HTX_FL_EOI; /* no more data are expected. Only EOM remains to add now */
+               res_htx->flags |= HTX_FL_EOM; /* no more data are expected. Only EOM remains to add now */
                if (!htx_add_endof(res_htx, HTX_BLK_EOM)) {
                        si_rx_room_blk(si);
                        goto out;
index 1126eca6e25b5171a2be2433daf1a40173276485..9ce95e00693f45866a2c350a458e6cbfdf348104 100644 (file)
@@ -605,7 +605,7 @@ int h1_parse_msg_eom(struct h1m *h1m, struct htx *dsthtx, size_t max)
                return 0;
        }
 
-       dsthtx->flags |= HTX_FL_EOI; /* no more data are expected. Only EOM remains to add now */
+       dsthtx->flags |= HTX_FL_EOM; /* no more data are expected. Only EOM remains to add now */
        if (max < sizeof(struct htx_blk) + 1 || !htx_add_endof(dsthtx, HTX_BLK_EOM))
                return 0;
 
index 5b8bf44feaec48e4ec557ba18d311a60195aa1e1..c4868dc1f2461c9b108cb9dc7af96657f47a4c9f 100644 (file)
--- a/src/h2.c
+++ b/src/h2.c
@@ -507,7 +507,7 @@ int h2_make_htx_request(struct http_hdr *list, struct htx *htx, unsigned int *ms
 
        if (*msgf & H2_MSGF_BODY_TUNNEL) {
                /* Add the EOM for tunnel requests (CONNECT) */
-               htx->flags |= HTX_FL_EOI; /* no more message data are expected */
+               htx->flags |= HTX_FL_EOM; /* no more message data are expected */
                if (!htx_add_endof(htx, HTX_BLK_EOM))
                        goto fail;
        }
@@ -720,7 +720,7 @@ int h2_make_htx_response(struct http_hdr *list, struct htx *htx, unsigned int *m
 
        if (*msgf & H2_MSGF_BODY_TUNNEL) {
                /* Tunnel sucessfully established, add the EOM now, all data are part of the tunnel */
-               htx->flags |= HTX_FL_EOI; /* no more message data are expected */
+               htx->flags |= HTX_FL_EOM; /* no more message data are expected */
                if (!htx_add_endof(htx, HTX_BLK_EOM))
                        goto fail;
        }
index 0de1937db1459ce5cca800558ee0c8a16dc8a971..bcf1830217f09e247d214a230059286f01a9d3cb 100644 (file)
@@ -7468,7 +7468,7 @@ void hlua_applet_http_fct(struct appctx *ctx)
                        goto error;
 
                /* Don't add TLR because mux-h1 will take care of it */
-               res_htx->flags |= HTX_FL_EOI; /* no more data are expected. Only EOM remains to add now */
+               res_htx->flags |= HTX_FL_EOM; /* no more data are expected. Only EOM remains to add now */
                if (!htx_add_endof(res_htx, HTX_BLK_EOM)) {
                        si_rx_room_blk(si);
                        goto out;
index 19b5fe5f78b86a9514fddb3c141486d2c2545127..469b9c095c9733601d629508b2cc3bf441c0f19b 100644 (file)
@@ -4409,7 +4409,7 @@ int http_forward_proxy_resp(struct stream *s, int final)
                channel_auto_close(res);
                channel_shutr_now(res);
                res->flags |= CF_EOI; /* The response is terminated, add EOI */
-               htxbuf(&res->buf)->flags |= HTX_FL_EOI; /* no more data are expected */
+               htxbuf(&res->buf)->flags |= HTX_FL_EOM; /* no more data are expected */
        }
        else {
                /* Send ASAP informational messages. Rely on CF_EOI for final
index 7ef2c6bee7f01f7c7b7eaf41754c761cbc65ea9b..3258b58d4a12d80e73bb388f65fe8e3254163704 100644 (file)
@@ -4721,7 +4721,7 @@ next_frame:
 
        if (htx_get_tail_type(htx) != HTX_BLK_EOM && (h2c->dff & H2_F_HEADERS_END_STREAM)) {
                /* Mark the end of message using EOM */
-               htx->flags |= HTX_FL_EOI; /* no more data are expected. Only EOM remains to add now */
+               htx->flags |= HTX_FL_EOM; /* no more data are expected. Only EOM remains to add now */
                if (!htx_add_endof(htx, HTX_BLK_EOM)) {
                        TRACE_STATE("failed to append HTX EOM block into rxbuf", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_H2S_ERR, h2c->conn);
                        goto fail;
@@ -4864,7 +4864,7 @@ try_again:
                 * EOM was already reported.
                 */
                if ((h2c->flags & H2_CF_IS_BACK) || !(h2s->flags & H2_SF_TUNNEL_ABRT)) {
-                       htx->flags |= HTX_FL_EOI; /* no more data are expected. Only EOM remains to add now */
+                       htx->flags |= HTX_FL_EOM; /* no more data are expected. Only EOM remains to add now */
                        if (!htx_add_endof(htx, HTX_BLK_EOM)) {
                                TRACE_STATE("h2s rxbuf is full, failed to add EOM", H2_EV_RX_FRAME|H2_EV_RX_DATA|H2_EV_H2S_BLK, h2c->conn, h2s);
                                h2c->flags |= H2_CF_DEM_SFULL;
@@ -6112,7 +6112,7 @@ static size_t h2_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun
                        cs->flags |= CS_FL_EOI;
        }
        else if (htx_is_empty(h2s_htx))
-               buf_htx->flags |= (h2s_htx->flags & HTX_FL_EOI);
+               buf_htx->flags |= (h2s_htx->flags & HTX_FL_EOM);
 
        buf_htx->extra = (h2s_htx->extra ? (h2s_htx->data + h2s_htx->extra) : 0);
        htx_to_buf(buf_htx, buf);
index be8bc64131a51656e036c554a99b3c6ef9816f0f..5ed96d6ece209ac1317028da974b936ce1c0410d 100644 (file)
@@ -4138,7 +4138,7 @@ static void http_stats_io_handler(struct appctx *appctx)
 
        if (appctx->st0 == STAT_HTTP_DONE) {
                /* Don't add TLR because mux-h1 will take care of it */
-               res_htx->flags |= HTX_FL_EOI; /* no more data are expected. Only EOM remains to add now */
+               res_htx->flags |= HTX_FL_EOM; /* no more data are expected. Only EOM remains to add now */
                if (!htx_add_endof(res_htx, HTX_BLK_EOM)) {
                        si_rx_room_blk(si);
                        goto out;
index 2a83dd1967bcdc4d9598b7d4429cc258f80570e6..b0352ba8cfe08d63d86929f83a4b00b4b4b05b18 100644 (file)
@@ -1360,7 +1360,7 @@ enum tcpcheck_eval_ret tcpcheck_eval_send(struct check *check, struct tcpcheck_r
                    (istlen(body) && !htx_add_data_atonce(htx, body)))
                        goto error_htx;
 
-               htx->flags |= HTX_FL_EOI; /* no more data are expected. Only EOM remains to add now */
+               htx->flags |= HTX_FL_EOM; /* no more data are expected. Only EOM remains to add now */
                if (!htx_add_endof(htx, HTX_BLK_EOM))
                        goto error_htx;