BUG/MINOR: cli: forward the whole command on master CLI

A bug occurs when the CLI proxy of the master received a command which
is prefixed by some spaces but without a routing prefix (@).
In this case the pcli_parse_request() was returning a wrong number of
data to forward.

The response analyzer was called twice and the prompt displayed twice.
This commit is contained in:
William Lallemand 2018-10-29 17:14:00 +01:00 committed by Willy Tarreau
parent ce487aab46
commit 744de5b52a

View File

@ -1766,7 +1766,7 @@ int pcli_parse_request(struct channel *req, int *target_pid)
if (*pfx_b != '@') {
/* there is no prefix */
pfx_b = NULL;
cmd_b = ptr;
cmd_b = input; /* if no prefix we don't trim anything */
state = PCLI_REQ_CMD;
continue;
}