Merge pull request #2260 from LLE8/fixi2pcontrol

add trailing newline character in i2pcontrol json response
This commit is contained in:
orignal
2025-11-17 21:24:21 -05:00
committed by GitHub
+3 -3
View File
@@ -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 (...)