[Invalid JSON if GET /operations via RESTCONF #82](https://github.com/clicon/clixon/issues/82), thanks achernavin22

This commit is contained in:
Olof hagsand 2019-04-09 16:32:17 +02:00
parent 9b9b53c4ee
commit 6bfa510ea3
3 changed files with 3 additions and 2 deletions

View file

@ -1164,7 +1164,7 @@ api_operations_get(clicon_handle h,
if (use_xml)
cprintf(cbx, "</operations>");
else
cprintf(cbx, "}");
cprintf(cbx, "}}");
FCGX_SetExitStatus(200, r->out); /* OK */
FCGX_FPrintF(r->out, "Content-Type: application/yang-data+%s\r\n", use_xml?"xml":"json");
FCGX_FPrintF(r->out, "\r\n");