From 69a9ec5befdd6403838dce4c98334a14e7427485 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 24 Apr 2025 14:54:55 +0200 Subject: [PATCH] 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 "@@" 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. --- src/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.c b/src/cli.c index 822de4e46..e3d0b6c7f 100644 --- a/src/cli.c +++ b/src/cli.c @@ -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); }