Livestatus: Fix 'OutputFormat:json' w/o space is valid (NagVis bug)

Fixes #6470
This commit is contained in:
Michael Friedrich 2014-06-11 22:53:56 +02:00
parent 318136257f
commit 8d344ebb3a
2 changed files with 11 additions and 2 deletions

View File

@ -106,8 +106,11 @@ LivestatusQuery::LivestatusQuery(const std::vector<String>& lines, const String&
String header = line.SubStr(0, col_index);
String params;
if (line.GetLength() > col_index + 2)
params = line.SubStr(col_index + 2);
//OutputFormat:json or OutputFormat: json
if (line.GetLength() > col_index + 1)
params = line.SubStr(col_index + 1);
params.Trim();
if (header == "ResponseHeader")
m_ResponseHeader = params;

View File

@ -0,0 +1,6 @@
GET hosts
Columns: name alias
OutputFormat:json
KeepAlive: on
ResponseHeader: fixed16