]> git.kaiwu.me - haproxy.git/commit
MAJOR: tree-wide: No longer use HTX_FL_HAS_EOM to detect end of message
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Sep 2026 05:33:18 +0000 (07:33 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 15:05:18 +0000 (17:05 +0200)
commit40e5dff61a1737be042b4a10b6dba7b517660f0d
tree9a854d101c27515fa054efbfdd492bfd1fcc053a
parent718883b069dfa4b9b2832c7087b8ea115ef3be5b
MAJOR: tree-wide: No longer use HTX_FL_HAS_EOM to detect end of message

HTX_FL_HAS_EOM flag on the HTX message is no longer used to mark or detect
the end of the message. htx_has_eom() function is used to detect it and
htx_set_eom() is used to set it (except inside the HTX API). Thus we now
rely on flags on the tail block to deal with the end of the message.

Most of time, the change is quite light and easy to review. However there
are 3 parts no so obvious:

 * The decompression filter: DECOMP_STATE_EOM_SEEN flag is now set only when
   a block is removed. It is the only way to loose the EOM. This part was
   placed in a dedicated function to not duplicate the code. At the end,
   before exiting and when the decompression is finished, the EOM flag is
   added on the tail block if necessary.

 * The compression filter: As for the decompression filter, the end of
   message is only evaluated when an HTX block is removed. It is the only
   way to loose it. And we try to restore it only on the last DATA block.

 * The lua filter API: The internal function used to remove part of the
   payload was updated to be sure to now loos the EOM on the tail block if
   it is removed.

In the HTX API, HTX_FL_HAS_EOM flag is now longet set.
12 files changed:
src/fcgi-app.c
src/flt_decomp.c
src/flt_http_comp.c
src/haload.c
src/hlua.c
src/hq_interop.c
src/http_ana.c
src/http_client.c
src/http_htx.c
src/htx.c
src/qcm_http.c
src/tcpcheck.c