mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-21 14:17:30 -04:00
BUG/MINOR: cli: Ensure all command outputs end with a LF
Since200b0fac("MEDIUM: Add support for updating TLS ticket keys via socket"),4147b2ef("MEDIUM: ssl: basic OCSP stapling support."), 4df59e9 ("MINOR: cli: add socket commands and config to prepend informational messages with severity") and654694e1("MEDIUM: stats/cli: add support for "set table key" to enter values"), commands 'set ssl tls-key', 'set ssl ocsp-response', 'set severity-output' and 'set table' do not always send an extra LF at the end of their outputs. This is required as mentioned in doc/management.txt: "Since multiple commands may be issued at once, haproxy uses the empty line as a delimiter to mark an end of output for each command" Signed-off-by: Aurlien Nephtali <aurelien.nephtali@corp.ovh.com>
This commit is contained in:
parent
33e083c92e
commit
6e8a41d8fc
3 changed files with 4 additions and 4 deletions
|
|
@ -1145,7 +1145,7 @@ static int cli_parse_set_severity_output(char **args, struct appctx *appctx, voi
|
|||
return 0;
|
||||
|
||||
appctx->ctx.cli.severity = LOG_ERR;
|
||||
appctx->ctx.cli.msg = "one of 'none', 'number', 'string' is a required argument";
|
||||
appctx->ctx.cli.msg = "one of 'none', 'number', 'string' is a required argument\n";
|
||||
appctx->st0 = CLI_ST_PRINT;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8554,7 +8554,7 @@ static int cli_parse_set_tlskeys(char **args, struct appctx *appctx, void *priva
|
|||
}
|
||||
ssl_sock_update_tlskey_ref(ref, &trash);
|
||||
appctx->ctx.cli.severity = LOG_INFO;
|
||||
appctx->ctx.cli.msg = "TLS ticket key updated!";
|
||||
appctx->ctx.cli.msg = "TLS ticket key updated!\n";
|
||||
appctx->st0 = CLI_ST_PRINT;
|
||||
return 1;
|
||||
|
||||
|
|
@ -8591,7 +8591,7 @@ static int cli_parse_set_ocspresponse(char **args, struct appctx *appctx, void *
|
|||
return 1;
|
||||
}
|
||||
appctx->ctx.cli.severity = LOG_INFO;
|
||||
appctx->ctx.cli.msg = "OCSP Response updated!";
|
||||
appctx->ctx.cli.msg = "OCSP Response updated!\n";
|
||||
appctx->st0 = CLI_ST_PRINT;
|
||||
return 1;
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -3334,7 +3334,7 @@ static int table_prepare_data_request(struct appctx *appctx, char **args)
|
|||
{
|
||||
if (appctx->ctx.table.action != STK_CLI_ACT_SHOW && appctx->ctx.table.action != STK_CLI_ACT_CLR) {
|
||||
appctx->ctx.cli.severity = LOG_ERR;
|
||||
appctx->ctx.cli.msg = "content-based lookup is only supported with the \"show\" and \"clear\" actions";
|
||||
appctx->ctx.cli.msg = "content-based lookup is only supported with the \"show\" and \"clear\" actions\n";
|
||||
appctx->st0 = CLI_ST_PRINT;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue