diff --git a/lib/http/server.js b/lib/http/server.js index 889cc872..6b3db540 100644 --- a/lib/http/server.js +++ b/lib/http/server.js @@ -614,12 +614,13 @@ HTTPServer.prototype._init = function _init() { }); } - if (!array) { - res.send(200, JSON.stringify(out[0]), 'json'); - return; - } + if (!array) + out = out[0]; - res.send(200, out); + out = JSON.stringify(out); + out += '\n'; + + res.send(200, out, 'json'); })); this.get('/', co(function* (req, res) {