MINOR: htx: Rename HTX_FL_EOI flag into HTX_FL_EOM
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.
diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-prometheus.c
index 364d4b6..cfd0d99 100644
--- a/contrib/prometheus-exporter/service-prometheus.c
+++ b/contrib/prometheus-exporter/service-prometheus.c
@@ -1226,7 +1226,7 @@
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;
diff --git a/include/haproxy/htx-t.h b/include/haproxy/htx-t.h
index f14bb25..6f0aa71 100644
--- a/include/haproxy/htx-t.h
+++ b/include/haproxy/htx-t.h
@@ -145,7 +145,7 @@
#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)
*/
diff --git a/include/haproxy/htx.h b/include/haproxy/htx.h
index 5c51e55..31bbcd9 100644
--- a/include/haproxy/htx.h
+++ b/include/haproxy/htx.h
@@ -591,7 +591,7 @@
*/
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
diff --git a/src/cache.c b/src/cache.c
index 3f95195..0bbba7e 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1499,7 +1499,7 @@
}
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;
diff --git a/src/h1_htx.c b/src/h1_htx.c
index 1126eca..9ce95e0 100644
--- a/src/h1_htx.c
+++ b/src/h1_htx.c
@@ -605,7 +605,7 @@
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;
diff --git a/src/h2.c b/src/h2.c
index 5b8bf44..c4868dc 100644
--- a/src/h2.c
+++ b/src/h2.c
@@ -507,7 +507,7 @@
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 @@
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;
}
diff --git a/src/hlua.c b/src/hlua.c
index 0de1937..bcf1830 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -7468,7 +7468,7 @@
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;
diff --git a/src/http_ana.c b/src/http_ana.c
index 19b5fe5..469b9c0 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -4409,7 +4409,7 @@
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
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 7ef2c6b..3258b58 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -4721,7 +4721,7 @@
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 @@
* 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 @@
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);
diff --git a/src/stats.c b/src/stats.c
index be8bc64..5ed96d6 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -4138,7 +4138,7 @@
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;
diff --git a/src/tcpcheck.c b/src/tcpcheck.c
index 2a83dd1..b0352ba 100644
--- a/src/tcpcheck.c
+++ b/src/tcpcheck.c
@@ -1360,7 +1360,7 @@
(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;