diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 9c126fc3da0..a9b73fd5a6a 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -940,6 +940,11 @@ void ServiceConnection(AcceptedConnection *conn) // Read HTTP message headers and body ReadHTTPMessage(conn->stream(), mapHeaders, strRequest, nProto); + if (strURI != "/") { + conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush; + break; + } + // Check authorization if (mapHeaders.count("authorization") == 0) {