mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02:00
BUG/MEDIUM: cli: Report inbuf is no longer full when a line is consumed
When the command line parsing was refactored (20ec1de21 "MAJOR: cli: Refacor parsing and execution of pipelined commands"), a regression was introduced. When input data are consumed, information about the applet's input buffer are no longer updated accordingly to state it is no longer full. So it is possible to freeze the CLI applet. And a spinning loop may be encountered if a client shutdown is detected in this state. The fix is obivous. When data are consumed from the applet's input buffer, APPCTX_FL_INBLK_FULL flag is removed to notify the input buffer is no longer full and more data can be sent to the CLI applet. This patch should fix the issue #3064. It must be backported to 3.2.
This commit is contained in:
parent
dc6e8dde23
commit
c6c2ef1f11
@ -974,6 +974,7 @@ int cli_parse_cmdline(struct appctx *appctx)
|
|||||||
|
|
||||||
b_del(&appctx->inbuf, len);
|
b_del(&appctx->inbuf, len);
|
||||||
b_add(appctx->cli_ctx.cmdline, len);
|
b_add(appctx->cli_ctx.cmdline, len);
|
||||||
|
applet_fl_clr(appctx, APPCTX_FL_INBLK_FULL);
|
||||||
|
|
||||||
if (!(appctx->st1 & APPCTX_CLI_ST1_PAYLOAD)) {
|
if (!(appctx->st1 & APPCTX_CLI_ST1_PAYLOAD)) {
|
||||||
char *last_arg;
|
char *last_arg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user