]> git.kaiwu.me - haproxy.git/commitdiff
MAJOR: htx: Rename HTX_FL_EOM into HTX_FL_HAS_EOM
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Jul 2026 13:03:22 +0000 (15:03 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 Jul 2026 09:58:25 +0000 (11:58 +0200)
It is just a flag renaming but it is an API breakage and this could generate
compilation errors for all external modules relying on the HTX API. This
change was performed to force to review all code using HTX to be sure this
flag is never set by hand from outside. Indeed, htx_set_eom() function must
always be used now.

17 files changed:
include/haproxy/htx-t.h
include/haproxy/htx.h
src/fcgi-app.c
src/flt_http_comp.c
src/h3.c
src/hlua.c
src/hq_interop.c
src/http_ana.c
src/http_client.c
src/http_htx.c
src/htx.c
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/qcm_http.c
src/stats-html.c
src/tcpcheck.c

index db3d3edff988336901cd448eb9bc5df97d365a35..c5a9d213e00d857772c6ca3b17587f96fbbd50ee 100644 (file)
@@ -180,7 +180,7 @@ static forceinline char *hsl_show_flags(char *buf, size_t len, const char *delim
 #define HTX_FL_PROCESSING_ERROR  0x00000002 /* Set when a processing error occurred */
 #define HTX_FL_FRAGMENTED        0x00000004 /* Set when the HTX buffer is fragmented */
 #define HTX_FL_UNORDERED         0x00000008 /* Set when the HTX buffer are not ordered */
-#define HTX_FL_EOM               0x00000010 /* Set when end-of-message is reached from the HTTP point of view */
+#define HTX_FL_HAS_EOM           0x00000010 /* Set when end-of-message is reached from the HTTP point of view */
 
 /* This function is used to report flags in debugging tools. Please reflect
  * below any single-bit flag addition above in the same order via the
@@ -193,7 +193,7 @@ static forceinline char *htx_show_flags(char *buf, size_t len, const char *delim
        _(0);
        /* flags */
        _(HTX_FL_PARSING_ERROR, _(HTX_FL_PROCESSING_ERROR,
-       _(HTX_FL_FRAGMENTED, _(HTX_FL_UNORDERED, _(HTX_FL_EOM)))));
+       _(HTX_FL_FRAGMENTED, _(HTX_FL_UNORDERED, _(HTX_FL_HAS_EOM)))));
        /* epilogue */
        _(~0U);
        return buf;
index 74b3ed2ee1baf4df495b4d0d5dabd19eea2ba7ed..f2e6ac7823cfe4d14ed6f81a82f0f5e7f025419a 100644 (file)
@@ -829,12 +829,12 @@ static inline int htx_is_empty_noerr(const struct htx *htx)
 
 /* Returns 1 if more data are expected for the message <htx>. Otherwise it
  * returns 0. Note that it is illegal to call this with htx == NULL. This
- * function relies on the HTX_FL_EOM flags. It means tunneled data are not
- * considered here.
+ * function relies on the HTX_FL_HAS_EOM flags. It means tunneled data are
+ * not considered here.
  */
 static inline int htx_expect_more(const struct htx *htx)
 {
-       return !(htx->flags & HTX_FL_EOM);
+       return !(htx->flags & HTX_FL_HAS_EOM);
 }
 
 /* Set EOM flag in <htx>. This function must always be called to report the end
@@ -852,7 +852,7 @@ static inline int htx_set_eom(struct htx *htx)
                        return 0;
        }
 
-       htx->flags |= HTX_FL_EOM;
+       htx->flags |= HTX_FL_HAS_EOM;
        return 1;
 }
 
index efcfd98d834c7f678aa6471ed9d02045d105a79e..479b1d8012b86d0ba33783a803b84b450d1feb22 100644 (file)
@@ -338,7 +338,7 @@ static int fcgi_flt_http_headers(struct stream *s, struct filter *filter, struct
                sl = http_get_stline(htx);
                if (s->txn.http->meth != HTTP_METH_HEAD && sl &&
                    (msg->flags & (HTTP_MSGF_XFER_LEN|HTTP_MSGF_CNT_LEN|HTTP_MSGF_TE_CHNK)) == HTTP_MSGF_XFER_LEN &&
-                   (htx->flags & HTX_FL_EOM)) {
+                   (htx->flags & HTX_FL_HAS_EOM)) {
                        struct htx_blk * blk;
                        char *end;
                        size_t len = 0;
index 7fa3d9623471870e7fc823a5c020eed08b0d1705..55feab80de55faf5f7c72771d4579caedd196ab6 100644 (file)
@@ -121,7 +121,7 @@ comp_prepare_compress_request(struct comp_state *st, struct stream *s, struct ht
        comp_type = NULL;
 
        /* compress only if body size is >= than the min size */
-       if (((msg->flags & HTTP_MSGF_CNT_LEN) || (htx->flags & HTX_FL_EOM)) &&
+       if (((msg->flags & HTTP_MSGF_CNT_LEN) || (htx->flags & HTX_FL_HAS_EOM)) &&
            ((s->be->comp && (comp_minsize = s->be->comp->minsize_req)) ||
             (strm_fe(s)->comp && (comp_minsize = strm_fe(s)->comp->minsize_req)))) {
                /* small requests should not be compressed */
@@ -297,7 +297,7 @@ comp_http_payload(struct stream *s, struct filter *filter, struct http_msg *msg,
                switch (type) {
                        case HTX_BLK_DATA:
                                /* it is the last data block */
-                               last = ((!next && (htx->flags & HTX_FL_EOM)) || (next && htx_get_blk_type(next) != HTX_BLK_DATA));
+                               last = ((!next && (htx->flags & HTX_FL_HAS_EOM)) || (next && htx_get_blk_type(next) != HTX_BLK_DATA));
                                v = htx_get_blk_value(htx, blk);
                                v = istadv(v, offset);
                                if (v.len > len) {
@@ -667,7 +667,7 @@ select_compression_response_header(struct comp_state *st, struct stream *s, stru
                goto fail;
 
        /* compress only if body size is >= than the min size */
-       if (((msg->flags & HTTP_MSGF_CNT_LEN) || (htx->flags & HTX_FL_EOM)) &&
+       if (((msg->flags & HTTP_MSGF_CNT_LEN) || (htx->flags & HTX_FL_HAS_EOM)) &&
            ((s->be->comp && (comp_minsize = s->be->comp->minsize_res)) ||
             (strm_fe(s)->comp && (comp_minsize = strm_fe(s)->comp->minsize_res)))) {
                /* small responses should not be compressed */
index aea4d7d3034013acf59f84f02efadf50647d2479..0d9599f92263cdd99052aaaeea8a8bbcddf73dcf 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -3038,7 +3038,7 @@ static size_t h3_snd_buf(struct qcs *qcs, struct buffer *buf, size_t count, char
        *fin = 0;
        htx = htx_from_buf(buf);
        /* EOM is saved here, useful if 0-copy is performed with HTX buf. */
-       eom = htx->flags & HTX_FL_EOM;
+       eom = htx->flags & HTX_FL_HAS_EOM;
 
        while (count && !htx_is_empty(htx) && qcc_stream_can_send(qcs) && ret >= 0) {
                idx = htx_get_head(htx);
@@ -3128,7 +3128,7 @@ static size_t h3_snd_buf(struct qcs *qcs, struct buffer *buf, size_t count, char
         * which results in transfers reported as prematurely aborted (cL--).
         */
 #if 0
-       if (unlikely((htx->flags & HTX_FL_EOM) && htx_is_empty(htx)) &&
+       if (unlikely((htx->flags & HTX_FL_HAS_EOM) && htx_is_empty(htx)) &&
                     !qcs_is_close_remote(qcs)) {
                /* Generate a STOP_SENDING if full response transferred before
                 * receiving the full request.
index cb44e02f25e0710cbe0279e2cf3fdc645e44e93a..3249e140fcddc68c1b593ce74112bcf1936256b9 100644 (file)
@@ -5856,7 +5856,7 @@ __LJMP static int hlua_applet_http_getline_yield(lua_State *L, int status, lua_K
        /* The message was fully consumed and no more data are expected
         * (EOM flag set).
         */
-       if (htx_is_empty(htx) && (htx->flags & HTX_FL_EOM)) {
+       if (htx_is_empty(htx) && (htx->flags & HTX_FL_HAS_EOM)) {
                http_ctx->flags |= APPLET_REQ_RECV;
                stop = 1;
        }
@@ -5952,7 +5952,7 @@ __LJMP static int hlua_applet_http_recv_yield(lua_State *L, int status, lua_KCon
        /* The message was fully consumed and no more data are expected
         * (EOM flag set).
         */
-       if (htx_is_empty(htx) && (htx->flags & HTX_FL_EOM)) {
+       if (htx_is_empty(htx) && (htx->flags & HTX_FL_HAS_EOM)) {
                http_ctx->flags |= APPLET_REQ_RECV;
                len = 0;
        }
@@ -7905,7 +7905,7 @@ __LJMP static int hlua_http_msg_unset_eom(lua_State *L)
        MAY_LJMP(check_args(L, 1, "set_eom"));
        msg = MAY_LJMP(hlua_checkhttpmsg(L, 1));
        htx = htxbuf(&msg->chn->buf);
-       htx->flags &= ~HTX_FL_EOM;
+       htx->flags &= ~HTX_FL_HAS_EOM;
        return 0;
 }
 
index 1eb4b6ee1d73d7f5ef4f8461edc9fb6275f95cc1..9824dd77c198a5a18a91031c637b9a7c310c4250 100644 (file)
@@ -240,7 +240,7 @@ static size_t hq_interop_snd_buf(struct qcs *qcs, struct buffer *buf,
        *fin = 0;
        htx = htx_from_buf(buf);
        /* EOM is saved here, useful if 0-copy is performed with HTX buf. */
-       eom = htx->flags & HTX_FL_EOM;
+       eom = htx->flags & HTX_FL_HAS_EOM;
 
        while (count && !htx_is_empty(htx) && qcc_stream_can_send(qcs)) {
                /* Not implemented : QUIC on backend side */
index 3ac9b5a90a2b2299d54fafe31a034c903fc979af..82553a58b4d77a01a951d6c5ef7fe498dbb94a1a 100644 (file)
@@ -743,7 +743,7 @@ int http_process_request(struct stream *s, struct channel *req, int an_bit)
         * in case we previously disabled it, otherwise we might cause
         * the client to delay further data.
         */
-       if ((sess->listener && (sess->listener->bind_conf->options & BC_O_NOQUICKACK)) && !(htx->flags & HTX_FL_EOM))
+       if ((sess->listener && (sess->listener->bind_conf->options & BC_O_NOQUICKACK)) && !(htx->flags & HTX_FL_HAS_EOM))
                conn_set_quickack(cli_conn, 1);
 
        /*************************************************************
@@ -992,7 +992,7 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
        else {
                c_adv(req, htx->data - co_data(req));
                if ((global.tune.options & GTUNE_USE_FAST_FWD) && (msg->flags & HTTP_MSGF_XFER_LEN) &&
-                   (!(msg->flags & HTTP_MSGF_CONN_UPG) || (htx->flags & HTX_FL_EOM)))
+                   (!(msg->flags & HTTP_MSGF_CONN_UPG) || (htx->flags & HTX_FL_HAS_EOM)))
                        channel_htx_forward_forever(req, htx);
        }
 
@@ -1003,7 +1003,7 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
         * in HTTP_MSG_ENDING state. Then if all data was marked to be
         * forwarded, set the state to HTTP_MSG_DONE.
         */
-       if (!(htx->flags & HTX_FL_EOM))
+       if (!(htx->flags & HTX_FL_HAS_EOM))
                goto missing_data_or_waiting;
 
        msg->msg_state = HTTP_MSG_ENDING;
@@ -2229,7 +2229,7 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit
         * in HTTP_MSG_ENDING state. Then if all data was marked to be
         * forwarded, set the state to HTTP_MSG_DONE.
         */
-       if (!(htx->flags & HTX_FL_EOM))
+       if (!(htx->flags & HTX_FL_HAS_EOM))
                goto missing_data_or_waiting;
 
        msg->msg_state = HTTP_MSG_ENDING;
@@ -4353,7 +4353,7 @@ enum rule_result http_wait_for_msg_body(struct stream *s, struct channel *chn,
        /* Now we're are waiting for the payload. We just need to know if all
         * data have been received or if the buffer is full.
         */
-       if ((htx->flags & HTX_FL_EOM) || htx_get_tail_type(htx) > HTX_BLK_DATA)
+       if ((htx->flags & HTX_FL_HAS_EOM) || htx_get_tail_type(htx) > HTX_BLK_DATA)
                goto end; /* all data received */
 
        if (bytes) {
index 35341fd637359fb54b3ccfa730245d810a284310..758a601396bb087b04dc9239dbe8747ff17a6e62 100644 (file)
@@ -561,7 +561,7 @@ void httpclient_applet_io_handler(struct appctx *appctx)
                                        goto out;
                                }
 
-                               if (htx->flags & HTX_FL_EOM) { /* check if a body need to be added */
+                               if (htx->flags & HTX_FL_HAS_EOM) { /* check if a body need to be added */
                                        appctx->st0 = HTTPCLIENT_S_RES_STLINE;
                                        applet_set_eoi(appctx);
                                        goto out; /* we need to leave the IO handler once we wrote the request */
@@ -623,8 +623,8 @@ void httpclient_applet_io_handler(struct appctx *appctx)
 
                                htx = htxbuf(outbuf);
 
-                               /* if the request contains the HTX_FL_EOM, we finished the request part. */
-                               if (htx->flags & HTX_FL_EOM) {
+                               /* if the request contains the HTX_FL_HAS_EOM, we finished the request part. */
+                               if (htx->flags & HTX_FL_HAS_EOM) {
                                        appctx->st0 = HTTPCLIENT_S_RES_STLINE;
                                        applet_set_eoi(appctx);
                                        goto out; /* we need to leave the IO handler once we wrote the request */
@@ -689,7 +689,7 @@ void httpclient_applet_io_handler(struct appctx *appctx)
 
                                /* if there is no HTX data anymore and the EOM flag is
                                 * set, leave (no body) */
-                               if (htx_is_empty(htx) && htx->flags & HTX_FL_EOM)
+                               if (htx_is_empty(htx) && htx->flags & HTX_FL_HAS_EOM)
                                        appctx->st0 = HTTPCLIENT_S_RES_END;
                                else
                                        appctx->st0 = HTTPCLIENT_S_RES_HDR;
@@ -772,7 +772,7 @@ void httpclient_applet_io_handler(struct appctx *appctx)
 
                                /* if there is no HTX data anymore and the EOM flag is
                                 * set, leave (no body) */
-                               if (htx_is_empty(htx) && htx->flags & HTX_FL_EOM) {
+                               if (htx_is_empty(htx) && htx->flags & HTX_FL_HAS_EOM) {
                                        appctx->st0 = HTTPCLIENT_S_RES_END;
                                } else {
                                        appctx->st0 = HTTPCLIENT_S_RES_BODY;
@@ -854,7 +854,7 @@ void httpclient_applet_io_handler(struct appctx *appctx)
                                        hc->ops.res_payload(hc);
 
                                /* if not finished, should be called again */
-                               if ((htx_is_empty(htx) && (htx->flags & HTX_FL_EOM))) {
+                               if ((htx_is_empty(htx) && (htx->flags & HTX_FL_HAS_EOM))) {
                                        appctx->st0 = HTTPCLIENT_S_RES_END;
                                        htx_to_buf(htx, inbuf);
                                        break;
index f006495397d8e2a6602f258b7c6258f1823d3c49..b7d263a5b32aaf90bcd8f55b8b08d8b701693ba8 100644 (file)
@@ -2686,7 +2686,7 @@ smp_fetch_htx_has_eom(const struct arg *arg_p, struct sample *smp, const char *k
        if (!htx)
                return 0;
 
-       smp->data.u.sint = !!(htx->flags & HTX_FL_EOM);
+       smp->data.u.sint = !!(htx->flags & HTX_FL_HAS_EOM);
        smp->data.type   = SMP_T_BOOL;
        smp->flags = SMP_F_VOLATILE | SMP_F_MAY_CHANGE;
        return 1;
index 3cd5a44cd4e5e4c3efd9a17a2324acb1897c3313..b5cee55b1ea3d765537904a86069393811fd8378 100644 (file)
--- a/src/htx.c
+++ b/src/htx.c
@@ -899,7 +899,7 @@ size_t htx_xfer(struct htx *dst, struct htx *src, size_t count, unsigned int fla
 
        /* Everything was copied, transfer terminal HTX flags too */
        if (!blk) {
-               dst->flags |= (src->flags & (HTX_FL_EOM|HTX_FL_PARSING_ERROR|HTX_FL_PROCESSING_ERROR));
+               dst->flags |= (src->flags & (HTX_FL_HAS_EOM|HTX_FL_PARSING_ERROR|HTX_FL_PROCESSING_ERROR));
                if (!(flags & HTX_XFER_KEEP_SRC_BLKS))
                        src->flags = 0;
        }
index c9fa7dc830b29b16689d69a852cff0895b60ec6e..ba9ce89911201699629c45b41280ff048c5b5441 100644 (file)
@@ -2184,7 +2184,7 @@ static size_t fcgi_strm_send_stdin(struct fcgi_conn *fconn, struct fcgi_strm *fs
        if (unlikely(size <= 0xFFFF && size == count && b_size(mbuf) == b_size(buf) &&
                     htx_nbblks(htx) == 1 && type == HTX_BLK_DATA)) {
                void *old_area = mbuf->area;
-               int eom = (htx->flags & HTX_FL_EOM);
+               int eom = (htx->flags & HTX_FL_HAS_EOM);
 
                 /* Last block of the message: Reserve the size for the empty stdin record */
                if (eom)
@@ -2262,7 +2262,7 @@ static size_t fcgi_strm_send_stdin(struct fcgi_conn *fconn, struct fcgi_strm *fs
                                TRACE_PROTO("sending stding data", FCGI_EV_TX_RECORD|FCGI_EV_TX_STDIN, fconn->conn, fstrm, htx, (size_t[]){size});
                                v = htx_get_blk_value(htx, blk);
 
-                               if (htx_is_unique_blk(htx, blk) && (htx->flags & HTX_FL_EOM))
+                               if (htx_is_unique_blk(htx, blk) && (htx->flags & HTX_FL_HAS_EOM))
                                        extra_bytes = FCGI_RECORD_HEADER_SZ; /* Last block of the message */
 
                                if (v.len > count) {
@@ -2311,7 +2311,7 @@ static size_t fcgi_strm_send_stdin(struct fcgi_conn *fconn, struct fcgi_strm *fs
        b_add(mbuf, outbuf.data);
 
        /* Send the empty stding here to finish the message */
-       if (htx_is_empty(htx) && (htx->flags & HTX_FL_EOM)) {
+       if (htx_is_empty(htx) && (htx->flags & HTX_FL_HAS_EOM)) {
          empty_stdin:
                TRACE_PROTO("sending FCGI STDIN record", FCGI_EV_TX_RECORD|FCGI_EV_TX_STDIN, fconn->conn, fstrm, htx);
                if (!fcgi_strm_send_empty_stdin(fconn, fstrm)) {
@@ -4169,7 +4169,7 @@ static size_t fcgi_snd_buf(struct stconn *sc, struct buffer *buf, size_t count,
                 * full. Otherwise, the request is invalid.
                 */
                sl = http_get_stline(htx);
-               if (!sl || (!(sl->flags & HTX_SL_F_CLEN) && !(htx->flags & HTX_FL_EOM))) {
+               if (!sl || (!(sl->flags & HTX_SL_F_CLEN) && !(htx->flags & HTX_FL_HAS_EOM))) {
                        htx->flags |= HTX_FL_PARSING_ERROR;
                        fcgi_strm_error(fstrm);
                        goto done;
@@ -4209,7 +4209,7 @@ static size_t fcgi_snd_buf(struct stconn *sc, struct buffer *buf, size_t count,
                                        if (!ret)
                                                goto done;
                                }
-                               if (htx_is_unique_blk(htx, blk) && (htx->flags & HTX_FL_EOM)) {
+                               if (htx_is_unique_blk(htx, blk) && (htx->flags & HTX_FL_HAS_EOM)) {
                                        TRACE_PROTO("sending FCGI STDIN record", FCGI_EV_TX_RECORD|FCGI_EV_TX_STDIN, fconn->conn, fstrm, htx);
                                        ret = fcgi_strm_send_empty_stdin(fconn, fstrm);
                                        if (!ret)
@@ -4230,7 +4230,7 @@ static size_t fcgi_snd_buf(struct stconn *sc, struct buffer *buf, size_t count,
                                break;
 
                        case HTX_BLK_EOT:
-                               if (htx_is_unique_blk(htx, blk) && (htx->flags & HTX_FL_EOM)) {
+                               if (htx_is_unique_blk(htx, blk) && (htx->flags & HTX_FL_HAS_EOM)) {
                                        TRACE_PROTO("sending FCGI STDIN record", FCGI_EV_TX_RECORD|FCGI_EV_TX_STDIN, fconn->conn, fstrm, htx);
                                        ret = fcgi_strm_send_empty_stdin(fconn, fstrm);
                                        if (!ret)
index 6c37b5d19568895fda40173ae31893aad4440432..319bc35b4c8a981e36e73a82e3f1f24f6a645b09 100644 (file)
@@ -2834,7 +2834,7 @@ static size_t h1_make_eoh(struct h1s *h1s, struct h1m *h1m, struct htx *htx, siz
                        TRACE_STATE("force close mode (T-E + HTTP/1.0)", H1_EV_TX_DATA|H1_EV_TX_HDRS, h1s->h1c->conn, h1s);
                }
                else if ((h1m->flags & H1_MF_CLEN) && h1m->body_len != 0 &&
-                        htx_is_unique_blk(htx, blk) && (htx->flags & HTX_FL_EOM) &&
+                        htx_is_unique_blk(htx, blk) && (htx->flags & HTX_FL_HAS_EOM) &&
                         (!(h1m->flags & H1_MF_RESP) || !(h1s->flags & H1S_F_BODYLESS_RESP))) {
                        /* C-L but no data for non-bodyless response or for a request: force close */
                        h1s->flags = (h1s->flags & ~H1S_F_WANT_MSK) | H1S_F_WANT_CLO;
@@ -2950,7 +2950,7 @@ static size_t h1_make_eoh(struct h1s *h1s, struct h1m *h1m, struct htx *htx, siz
                TRACE_STATE("1xx response xferred", H1_EV_TX_DATA|H1_EV_TX_HDRS, h1c->conn, h1s);
        }
        else if (htx_is_unique_blk(htx, blk) &&
-                ((htx->flags & HTX_FL_EOM) || ((h1m->flags & H1_MF_CLEN) && !h1m->curr_len))) {
+                ((htx->flags & HTX_FL_HAS_EOM) || ((h1m->flags & H1_MF_CLEN) && !h1m->curr_len))) {
                /* EOM flag is set and it is the last block or there is no
                 * payload. It cannot be removed now. We must emit the end of
                 * the message first to be sure the output buffer is not full.
@@ -2962,7 +2962,7 @@ static size_t h1_make_eoh(struct h1s *h1s, struct h1m *h1m, struct htx *htx, siz
                }
                else if (!chunk_memcat(&outbuf, "\r\n", 2))
                        goto full;
-               h1m->state = ((htx->flags & HTX_FL_EOM) ? H1_MSG_DONE : H1_MSG_TRAILERS);
+               h1m->state = ((htx->flags & HTX_FL_HAS_EOM) ? H1_MSG_DONE : H1_MSG_TRAILERS);
        }
        else {
                if (!chunk_memcat(&outbuf, "\r\n", 2))
@@ -3032,7 +3032,7 @@ static size_t h1_make_data(struct h1s *h1s, struct h1m *h1m, struct buffer *buf,
            htx_get_blk_value(htx, blk).len == count &&
            b_size(&h1c->obuf) == b_size(buf)) {
                void *old_area;
-               int eom = (htx->flags & HTX_FL_EOM);
+               int eom = (htx->flags & HTX_FL_HAS_EOM);
 
                old_area = h1c->obuf.area;
                h1c->obuf.area = buf->area;
@@ -3147,7 +3147,7 @@ static size_t h1_make_data(struct h1s *h1s, struct h1m *h1m, struct buffer *buf,
                                /* Get the maximum amount of data we can xferred */
                                vlen = count;
                        }
-                       else if (htx_is_unique_blk(htx, blk) && (htx->flags & HTX_FL_EOM)) {
+                       else if (htx_is_unique_blk(htx, blk) && (htx->flags & HTX_FL_HAS_EOM)) {
                                /* It is the last block of this message. After this one,
                                 * only tunneled data may be forwarded. */
                                TRACE_DEVEL("last message block", H1_EV_TX_DATA|H1_EV_TX_BODY, h1c->conn, h1s);
index ae6eb00a94d2e68985024e97b4b539036ef49f92..b07b97ef7c3a55e1b9689e416f8bba86998313d7 100644 (file)
@@ -6837,7 +6837,7 @@ static size_t h2s_snd_fhdrs(struct h2s *h2s, struct htx *htx)
                /* Response already closed: add END_STREAM */
                es_now = 1;
        }
-       else if ((htx->flags & HTX_FL_EOM) && htx_is_empty(htx) && h2s->status >= 200) {
+       else if ((htx->flags & HTX_FL_HAS_EOM) && htx_is_empty(htx) && h2s->status >= 200) {
                /* EOM+empty: we may need to add END_STREAM except for 1xx
                 * responses and tunneled response.
                 */
@@ -7272,7 +7272,7 @@ static size_t h2s_snd_bhdrs(struct h2s *h2s, struct htx *htx)
                /* Request already closed: add END_STREAM */
                es_now = 1;
        }
-       if ((htx->flags & HTX_FL_EOM) && htx_is_empty(htx)) {
+       if ((htx->flags & HTX_FL_HAS_EOM) && htx_is_empty(htx)) {
                /* EOM+empty: we may need to add END_STREAM (except for CONNECT
                 * request)
                 */
@@ -7443,7 +7443,7 @@ static size_t h2s_make_data(struct h2s *h2s, struct buffer *buf, size_t count)
                        goto end;
                }
 
-               if (htx->flags & HTX_FL_EOM) {
+               if (htx->flags & HTX_FL_HAS_EOM) {
                        /* EOM+empty: we may need to add END_STREAM (except for tunneled
                         * message)
                         */
@@ -7580,7 +7580,7 @@ static size_t h2s_make_data(struct h2s *h2s, struct buffer *buf, size_t count)
        total += fsize;
        if (fsize == bsize) {
                htx_remove_blk(htx, blk);
-               if ((htx->flags & HTX_FL_EOM) && htx_is_empty(htx)) {
+               if ((htx->flags & HTX_FL_HAS_EOM) && htx_is_empty(htx)) {
                        /* EOM+empty: we may need to add END_STREAM (except for tunneled
                         * message)
                         */
@@ -7664,7 +7664,7 @@ static size_t h2s_skip_data(struct h2s *h2s, struct buffer *buf, size_t count)
        if (fsize != bsize)
                goto skip_data;
 
-       if (!(htx->flags & HTX_FL_EOM) || !htx_is_unique_blk(htx, blk))
+       if (!(htx->flags & HTX_FL_HAS_EOM) || !htx_is_unique_blk(htx, blk))
                goto skip_data;
 
        h2s->flags &= ~H2_SF_MORE_HTX_DATA;
index 1593d428e8d91e1ff99bb7b02131d63d394fbfd5..7f7cc57aa6f84047e03a456d1aaa2211c80cb27b 100644 (file)
@@ -33,7 +33,7 @@ size_t qcs_http_rcv_buf(struct qcs *qcs, struct buffer *buf, size_t count,
        cs_htx = htx_from_buf(buf);
        if (htx_is_empty_noerr(cs_htx) && htx_used_space(qcs_htx) <= count) {
                /* EOM will be copied to cs_htx via b_xfer(). */
-               if ((qcs_htx->flags & HTX_FL_EOM) &&
+               if ((qcs_htx->flags & HTX_FL_HAS_EOM) &&
                    !(qcs->flags & QC_SF_EOI_SUSPENDED)) {
                        *fin = 1;
                }
@@ -48,7 +48,7 @@ size_t qcs_http_rcv_buf(struct qcs *qcs, struct buffer *buf, size_t count,
        BUG_ON(qcs_htx->flags & HTX_FL_PARSING_ERROR);
 
        /* EOM was copied to cs_htx if all data were copied. */
-       if (cs_htx->flags & HTX_FL_EOM) {
+       if (cs_htx->flags & HTX_FL_HAS_EOM) {
                if (!(qcs->flags & QC_SF_EOI_SUSPENDED))
                        *fin = 1;
        }
index 069b964b4d8823c2ae5c2abd1821716d0c50e6ec..533da726d5e073408ba25ed437f0d7b44404a67a 100644 (file)
@@ -1668,7 +1668,7 @@ static int stats_process_http_post(struct stconn *sc)
        struct htx_blk *blk;
 
        /*  we need more data */
-       if (!(htx->flags & HTX_FL_EOM)) {
+       if (!(htx->flags & HTX_FL_HAS_EOM)) {
                /* check if we can receive more */
                if (applet_fl_test(appctx, APPCTX_FL_INBLK_FULL)) {
                        ctx->st_code = STAT_STATUS_EXCD;
index 9ca6c42d6703cd1b2bf776b1521b70d7449456c9..fb4fe92b952a0387f852028a7ec432f195d602b7 100644 (file)
@@ -2000,7 +2000,7 @@ enum tcpcheck_eval_ret tcpcheck_eval_expect_http(struct check *check, struct tcp
 
        TRACE_ENTER(CHK_EV_TCPCHK_EXP, check);
 
-       last_read |= (!htx_free_data_space(htx) || (htx->flags & HTX_FL_EOM));
+       last_read |= (!htx_free_data_space(htx) || (htx->flags & HTX_FL_HAS_EOM));
 
        if (htx->flags & HTX_FL_PARSING_ERROR) {
                TRACE_ERROR("invalid response", CHK_EV_TCPCHK_EXP|CHK_EV_TCPCHK_ERR, check);