X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/1b029b765fcc4ee99a52c8b4be1fe7426beb5f27..36abb8ae8f9bdedff1bdc251c049890026700e59:/src/main/java/org/asamk/signal/http/HttpServerHandler.java diff --git a/src/main/java/org/asamk/signal/http/HttpServerHandler.java b/src/main/java/org/asamk/signal/http/HttpServerHandler.java index f6301e0a..32000a1f 100644 --- a/src/main/java/org/asamk/signal/http/HttpServerHandler.java +++ b/src/main/java/org/asamk/signal/http/HttpServerHandler.java @@ -59,13 +59,17 @@ public class HttpServerHandler { httpExchange.getResponseBody().write(byteResponse); } else { - httpExchange.sendResponseHeaders(status, 0); + httpExchange.sendResponseHeaders(status, -1); } httpExchange.getResponseBody().close(); } private void handleRpcEndpoint(HttpExchange httpExchange) throws IOException { + if (!"/api/v1/rpc".equals(httpExchange.getRequestURI().getPath())) { + sendResponse(404, null, httpExchange); + return; + } if (!"POST".equals(httpExchange.getRequestMethod())) { sendResponse(405, null, httpExchange); return;