]> git.kaiwu.me - haproxy.git/commit
DOC: internals: Update the HTX API documentation
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Sep 2026 07:00:20 +0000 (09:00 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 15:05:18 +0000 (17:05 +0200)
commit21be0976293aa372a0464fe7ea7d3c46b9684b98
tree4de444cd49e05fbde3ee1ea6e4faeec8f53d7b5b
parent7420438306e14fd5b65fff7b9a9be62ff5491ee8
DOC: internals: Update the HTX API documentation

The HTX API documentation was not up-to-date anymore. It still described the
end of the message as a flag on the HTX message itself and said nothing
about the flags on the HTX blocks. Let's update it to reflect the recent
changes:

  * A block's metadata is now composed of 3 fields. The flags field was
    added and the address field is now a 28 bits field, limiting the
    payloads part to 256 MB.

  * The end of the message is now marked by the HTX_BLK_FL_EOM flag, set on
    the last block of the message. htx_set_eom() and htx_has_eom() must be
    used to set it and to test it. Because the flag is carried by the tail
    block, nothing must be added in a message already ended. Only headers
    and trailers may still be added because they are moved at the right
    place, before the corresponding end-of marker.

  * htx_get_first_blk(), htx_get_prev_blk() and htx_get_next_blk() now skip
    the unused blocks and htx_remove_blk() never leaves an unused block on
    the head or on the tail of the message. So there is no longer any need
    to test the block's type against HTX_BLK_UNUSED when looping on an HTX
    message.

  * htx_is_unique_blk() was removed.

  * The restrictions on htx_xfer() and htx_append_msg() were added and
    htx_skip_msg_payload(), which was not documented at all, was added.

In addition, few pre-existing errors were fixed. htx_move_blk_before() moves
a block before the pivot and not after it. The function used to add a
trailer is htx_add_trailer() and not htx_add_trailers(). And a duplicated
paragraph about htx_remove_blk() was removed.
doc/internals/api/htx-api.txt