diff --git a/reg-tests/sample_fetches/vars.vtc b/reg-tests/sample_fetches/vars.vtc index 5144e9f4e..29d474cf2 100644 --- a/reg-tests/sample_fetches/vars.vtc +++ b/reg-tests/sample_fetches/vars.vtc @@ -34,7 +34,7 @@ haproxy h1 -conf { haproxy h1 -cli { send "get var proc.int5" - expect ~ "^proc.int5: type=sint value=<5>$" + expect ~ "^proc.int5: type=sint value=<5>" } client c1 -connect ${h1_fe1_sock} { @@ -51,7 +51,7 @@ client c1 -connect ${h1_fe1_sock} { haproxy h1 -cli { send "get var proc.int5" - expect ~ "^proc.int5: type=sint value=<10>$" + expect ~ "^proc.int5: type=sint value=<10>" } client c2 -connect ${h1_fe1_sock} { @@ -68,7 +68,7 @@ client c2 -connect ${h1_fe1_sock} { haproxy h1 -cli { send "get var proc.int5" - expect ~ "^proc.int5: type=sint value=<20>$" + expect ~ "^proc.int5: type=sint value=<20>" } haproxy h1 -cli { diff --git a/src/vars.c b/src/vars.c index 05e79f44a..2cddb7749 100644 --- a/src/vars.c +++ b/src/vars.c @@ -1158,7 +1158,7 @@ static int vars_parse_cli_get_var(char **args, char *payload, struct appctx *app if (!sample_casts[smp.data.type][SMP_T_STR] || !sample_casts[smp.data.type][SMP_T_STR](&smp)) { - chunk_appendf(&trash, "(undisplayable)"); + chunk_appendf(&trash, "(undisplayable)\n"); } else { /* Display the displayable chars*. */ b_putchr(&trash, '<'); @@ -1169,6 +1169,7 @@ static int vars_parse_cli_get_var(char **args, char *payload, struct appctx *app b_putchr(&trash, '.'); } b_putchr(&trash, '>'); + b_putchr(&trash, '\n'); b_putchr(&trash, 0); } return cli_msg(appctx, LOG_INFO, trash.area);