BUG/MEDIUM: applet: Fix HTX .rcv_buf callback function to release outbuf buffer

In appctx_htx_rcv_buf(), HTX blocks found in the appctx output buffer are
copied into the channel buffer. At the end, the state of the underlying
buffer must be updated. If everything was copied, the buffer is reset. This
way, it will be released later, at the end of the applet process function.

However, here there was a typo. We do it on the input buffer instead of the
output buffer. As side effect, an empty HTX message remained stuck in the
appctx outbut buffer, blocking the applet and leading to blocked session
with no expiration date.

No backport needed.
This commit is contained in:
Christopher Faulet 2024-02-26 16:34:43 +01:00
parent dec017575d
commit 19559d4447

View File

@ -506,7 +506,7 @@ size_t appctx_htx_rcv_buf(struct appctx *appctx, struct buffer *buf, size_t coun
}
buf_htx->extra = (appctx_htx->extra ? (appctx_htx->data + appctx_htx->extra) : 0);
htx_to_buf(buf_htx, buf);
htx_to_buf(appctx_htx, &appctx->inbuf);
htx_to_buf(appctx_htx, &appctx->outbuf);
ret -= appctx_htx->data;
out: