MINOR: htx: Add an HTX flag to know when a message is fragmented
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 21 Sep 2021 13:39:30 +0000 (15:39 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 19 Oct 2021 13:44:15 +0000 (15:44 +0200)
commitbc9440aa7545d540502d2bc4e36403f0f418c462
tree69f44b572ea96701c171aeb07fa6eaede587ae9b
parent54f9064a3286ab45872640ad19bc84efc719179f
MINOR: htx: Add an HTX flag to know when a message is fragmented

HTX_FL_FRAGMENTED flag is now set on an HTX message when it is
fragmented. It happens when an HTX block is removed in the middle of the
message and flagged as unused. HTX_FL_FRAGMENTED flag is removed when all
data are removed from the message or when the message is defragmented.

Note that some optimisations are still possible because the flag can be
avoided in other situations. For instance when the last header of a bodyless
message is removed.

(cherry picked from commit 4697c92c9d7f875b30413a20bfeb56f318c182d1)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 95bf88d719fa04bfa89808522971cabcbc6ffd4f)
[cf: Value of HTX_FL_FRAGMENTED flag was changed]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
include/haproxy/htx-t.h
src/htx.c