A theoritical bug was introduced by the commit
30890fd90 ("BUG/MEDIUM:
flt-http-comp: Block HTX_FL_EOM flag till the end of compression"). On the
normal case, the HTX_FL_EOM flag was restored without checking if the HTX
message was empty or not. It could be an issue. Instead, htx_set_eom()
function must be used.
This patch must be backported with the commit above.
/* The compression is finished and we must now restore the EOM flog on
* the HTX message.
*/
- if ((st->flags & (COMP_STATE_PROCESSING|COMP_STATE_EOM_SEEN)) == COMP_STATE_EOM_SEEN)
- htx->flags |= HTX_FL_EOM;
+ if ((st->flags & (COMP_STATE_PROCESSING|COMP_STATE_EOM_SEEN)) == COMP_STATE_EOM_SEEN) {
+ unsigned int data = htx->data;
+
+ htx_set_eom(htx);
+ to_forward += htx->data - data;
+ }
if (to_forward != consumed)
flt_update_offsets(filter, msg->chn, to_forward - consumed);