When http_wait_for_msg_body() was introduced, an HTX defragmentation was
performed on any fragmented or unordered message, hoping it would ease the
payload analysis afterwards. In fact, this defrag is useless because the
same condition is already handled by sc_conn_recv() and sc_applet_recv(),
which defragment the HTX message on every receive when the buffer is
stuck and the message is fragmented or its free space wraps. Thus, while
we are waiting for the payload, the message is defragmented as soon as
new data arrive.
In addition, since the previous commit, the sample fetches retrieving the
body from an HTX message now defrag it themselves if needed. So there is
no consumer left relying on the message being defragmented when the wait
ends.
This defrag was introduced in 3.4 with the commit
f559c202f ("MINOR:
http-ana: Do a defrag on unaligned HTX message when waiting for payload").
Given its speculative nature, it does not need to be backported.
if (ret != HTTP_RULE_RES_YIELD)
chn->analyse_exp = TICK_ETERNITY;
- if (htx->flags & (HTX_FL_FRAGMENTED|HTX_FL_UNORDERED))
- htx_defrag(htx, NULL, 0);
return ret;
abort: