mirror of https://github.com/Icinga/icinga2.git
Livestatus: Fix 'OutputFormat:json' w/o space is valid (NagVis bug)
Fixes #6470
This commit is contained in:
parent
318136257f
commit
8d344ebb3a
|
@ -106,8 +106,11 @@ LivestatusQuery::LivestatusQuery(const std::vector<String>& lines, const String&
|
||||||
String header = line.SubStr(0, col_index);
|
String header = line.SubStr(0, col_index);
|
||||||
String params;
|
String params;
|
||||||
|
|
||||||
if (line.GetLength() > col_index + 2)
|
//OutputFormat:json or OutputFormat: json
|
||||||
params = line.SubStr(col_index + 2);
|
if (line.GetLength() > col_index + 1)
|
||||||
|
params = line.SubStr(col_index + 1);
|
||||||
|
|
||||||
|
params.Trim();
|
||||||
|
|
||||||
if (header == "ResponseHeader")
|
if (header == "ResponseHeader")
|
||||||
m_ResponseHeader = params;
|
m_ResponseHeader = params;
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
GET hosts
|
||||||
|
Columns: name alias
|
||||||
|
OutputFormat:json
|
||||||
|
KeepAlive: on
|
||||||
|
ResponseHeader: fixed16
|
||||||
|
|
Loading…
Reference in New Issue