diff --git a/doc/internals/api/htx-api.txt b/doc/internals/api/htx-api.txt index 62b3093f4..93142018e 100644 --- a/doc/internals/api/htx-api.txt +++ b/doc/internals/api/htx-api.txt @@ -540,14 +540,15 @@ message. These functions are used by HTX analyzers or by multiplexers. the amount of data drained. - htx_xfer_blks() transfers HTX blocks from an HTX message to another, - stopping on the first block of a specified type or when a specific amount - of bytes, including meta-data, was moved. If the tail block is a DATA - block, it may be partially moved. All other block are transferred at once - or kept. This function returns a mixed value, with the last block moved, - or NULL if nothing was moved, and the amount of data transferred. When - HEADERS or TRAILERS blocks must be transferred, this function transfers - all of them. Otherwise, if it is not possible, it triggers an error. It is - the caller responsibility to transfer all headers or trailers at once. + stopping after the first block of a specified type is transferred or when + a specific amount of bytes, including meta-data, was moved. If the tail + block is a DATA block, it may be partially moved. All other block are + transferred at once or kept. This function returns a mixed value, with the + last block moved, or NULL if nothing was moved, and the amount of data + transferred. When HEADERS or TRAILERS blocks must be transferred, this + function transfers all of them. Otherwise, if it is not possible, it + triggers an error. It is the caller responsibility to transfer all headers + or trailers at once. - htx_append_msg() append an HTX message to another one. All the message is copied or nothing. So, if an error occurred, a rollback is performed. This diff --git a/src/htx.c b/src/htx.c index a438d7ff5..105b2ad60 100644 --- a/src/htx.c +++ b/src/htx.c @@ -675,10 +675,10 @@ struct htx_blk *htx_replace_blk_value(struct htx *htx, struct htx_blk *blk, return blk; } -/* Transfer HTX blocks from to , stopping on the first block of the - * type (typically EOH or EOT) or when bytes were moved - * (including payload and meta-data). It returns the number of bytes moved and - * the last HTX block inserted in . +/* Transfer HTX blocks from to , stopping once the first block of the + * type is transferred (typically EOH or EOT) or when bytes were + * moved (including payload and meta-data). It returns the number of bytes moved + * and the last HTX block inserted in . */ struct htx_ret htx_xfer_blks(struct htx *dst, struct htx *src, uint32_t count, enum htx_blk_type mark)