MINOR: filters: Reset knwon input payload length if a data filter is used

It a data filter is registered on a channel, the corresponding <kip>
field must be reset because the payload may be altered.
This commit is contained in:
Christopher Faulet 2025-09-18 08:58:03 +02:00
parent 30c50e4f19
commit be1ce400c4

View File

@ -738,6 +738,7 @@ flt_http_payload(struct stream *s, struct http_msg *msg, unsigned int len)
htx->flags |= HTX_FL_ALTERED_PAYLOAD;
if (msg->flags & HTTP_MSGF_XFER_LEN)
htx->extra = 0;
chn_prod(msg->chn)->sedesc->kip = 0;
DBG_TRACE_LEAVE(STRM_EV_STRM_ANA|STRM_EV_HTTP_ANA|STRM_EV_FLT_ANA, s);
return ret;
}
@ -1019,6 +1020,7 @@ flt_tcp_payload(struct stream *s, struct channel *chn, unsigned int len)
*strm_off += ret;
}
end:
chn_prod(chn)->sedesc->kip = 0;
DBG_TRACE_LEAVE(STRM_EV_TCP_ANA|STRM_EV_FLT_ANA, s);
return ret;
}