mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-12 05:32:16 -04:00
MINOR: cli: report an error message on missing argument to compression rate
"set rate-limit http-compression global" needs an integer and must complain when it's not there.
This commit is contained in:
parent
072a2bf537
commit
85d47f9d98
1 changed files with 6 additions and 0 deletions
|
|
@ -1274,6 +1274,12 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line)
|
|||
if (strcmp(args[3], "global") == 0) {
|
||||
int v;
|
||||
|
||||
if (!*args[4]) {
|
||||
si->applet.ctx.cli.msg = "Expects a maximum input byte rate in kB/s.\n";
|
||||
si->applet.st0 = STAT_CLI_PRINT;
|
||||
return 1;
|
||||
}
|
||||
|
||||
v = atoi(args[4]);
|
||||
global.comp_rate_lim = v * 1024; /* Kilo to bytes. */
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue