mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 14:21:00 +01:00
MINOR: cli: Use a full prompt command for bidir connections with workers
When a bidirection connection with no command is establisehd with a worker (so "@@<pid>" alone), a "prompt" command is automatically added to display the worker's prompt and enter in interactive mode in the worker context. However, till now, an unfinished command line is sent, with a semicolon instead of a newline at the end. It is not exactly a bug because this works. But it is not really expected and could be a problem for future changes. So now, a full command line is sent: the "prompt" command finished by a newline character.
This commit is contained in:
parent
d3f9289447
commit
69a9ec5bef
@ -2938,7 +2938,7 @@ int pcli_find_bidir_prefix(struct stream *s, struct channel *req, char **str, co
|
||||
|
||||
/* without any command, simply enter the worker in interactive mode */
|
||||
if (!ret) {
|
||||
const char *cmd = "prompt;";
|
||||
const char *cmd = "prompt\n";
|
||||
ci_insert(req, 0, cmd, strlen(cmd));
|
||||
ret += strlen(cmd);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user