mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-18 03:26:55 +00:00
BUG/MINOR: cli/stats: add missing trailing LF after JSON outputs
Patrick Hemmer reported that we have a bug in the CLI commands
"show stat json" and "show schema json" in that they forget the trailing
LF that's required to mark the end of the response. This has been the
case since the introduction of the feature in 1.8-dev1 by commit 6f6bb380e
("MEDIUM: stats: Add show json schema"), so this fix may be backported to
all versions.
This commit is contained in:
parent
3a2fcfd58d
commit
5a0e7ca5d0
@ -3667,7 +3667,7 @@ static void stats_dump_json_header()
|
||||
*/
|
||||
static void stats_dump_json_end()
|
||||
{
|
||||
chunk_strcat(&trash, "]");
|
||||
chunk_strcat(&trash, "]\n");
|
||||
}
|
||||
|
||||
/* Uses <appctx.ctx.stats.obj1> as a pointer to the current proxy and <obj2> as
|
||||
@ -4779,6 +4779,7 @@ static void stats_dump_json_schema(struct buffer *out)
|
||||
chunk_appendf(out,
|
||||
"{\"errorStr\":\"output buffer too short\"}");
|
||||
}
|
||||
chunk_appendf(out, "\n");
|
||||
}
|
||||
|
||||
/* This function dumps the schema onto the stream connector's read buffer.
|
||||
|
Loading…
Reference in New Issue
Block a user