mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-05-25 16:24:47 +00:00
Merge pull request #2260 from LLE8/fixi2pcontrol
add trailing newline character in i2pcontrol json response
This commit is contained in:
@@ -273,14 +273,14 @@ namespace client
|
||||
{
|
||||
response << "{\"id\":" << id << ",\"result\":{";
|
||||
(this->*(it->second))(pt.get_child ("params"), response);
|
||||
response << "},\"jsonrpc\":\"2.0\"}";
|
||||
response << "},\"jsonrpc\":\"2.0\"}\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
LogPrint (eLogWarning, "I2PControl: Unknown method ", method);
|
||||
response << "{\"id\":null,\"error\":";
|
||||
response << "{\"code\":-32601,\"message\":\"Method not found\"},";
|
||||
response << "\"jsonrpc\":\"2.0\"}";
|
||||
response << "\"jsonrpc\":\"2.0\"}\n";
|
||||
}
|
||||
SendResponse (socket, buf, response, isHtml);
|
||||
}
|
||||
@@ -290,7 +290,7 @@ namespace client
|
||||
std::ostringstream response;
|
||||
response << "{\"id\":null,\"error\":";
|
||||
response << "{\"code\":-32700,\"message\":\"" << ex.what () << "\"},";
|
||||
response << "\"jsonrpc\":\"2.0\"}";
|
||||
response << "\"jsonrpc\":\"2.0\"}\n";
|
||||
SendResponse (socket, buf, response, isHtml);
|
||||
}
|
||||
catch (...)
|
||||
|
||||
Reference in New Issue
Block a user