rpc: better bitcoind compat.

This commit is contained in:
Christopher Jeffrey 2017-02-26 04:21:24 -08:00
parent 3ac0d3de78
commit ad51bf53f3
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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) {