aboutsummaryrefslogtreecommitdiff
path: root/src/httprpc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/httprpc.cpp')
-rw-r--r--src/httprpc.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp
index 6a6c5276cc..54651911aa 100644
--- a/src/httprpc.cpp
+++ b/src/httprpc.cpp
@@ -172,19 +172,22 @@ static bool HTTPReq_JSONRPC(HTTPRequest* req, const std::string &)
return false;
}
- JSONRequest jreq;
+ JSONRPCRequest jreq;
try {
// Parse request
UniValue valRequest;
if (!valRequest.read(req->ReadBody()))
throw JSONRPCError(RPC_PARSE_ERROR, "Parse error");
+ // Set the URI
+ jreq.URI = req->GetURI();
+
std::string strReply;
// singleton request
if (valRequest.isObject()) {
jreq.parse(valRequest);
- UniValue result = tableRPC.execute(jreq.strMethod, jreq.params);
+ UniValue result = tableRPC.execute(jreq);
// Send reply
strReply = JSONRPCReply(result, NullUniValue, jreq.id);