From d64030e255c0f9066b775420a06acbf475edd9bc Mon Sep 17 00:00:00 2001 From: Anon2025 Date: Mon, 17 Nov 2025 13:56:38 +0300 Subject: [PATCH] add trailing newline in i2pcontrol json response --- daemon/I2PControl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/I2PControl.cpp b/daemon/I2PControl.cpp index 9babce93..3e7046b1 100644 --- a/daemon/I2PControl.cpp +++ b/daemon/I2PControl.cpp @@ -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 (...)