summaryrefslogtreecommitdiff
path: root/src/HttpServer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/HttpServer.cc')
-rw-r--r--src/HttpServer.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc
index 4de172e3..53145037 100644
--- a/src/HttpServer.cc
+++ b/src/HttpServer.cc
@@ -330,19 +330,22 @@ int HttpServer::setupResponseRecv()
return 0;
}
} else if(getMethod() == "POST") {
+ if(path == "/jsonrpc") {
+ if(reqType_ != RPC_TYPE_JSON) {
+ reqType_ = RPC_TYPE_JSON;
+ lastBody_.reset(new json::JsonDiskWriter());
+ }
+ return 0;
+ }
+#ifdef ENABLE_XML_RPC
if(path == "/rpc") {
if(reqType_ != RPC_TYPE_XML) {
reqType_ = RPC_TYPE_XML;
lastBody_.reset(new rpc::XmlRpcDiskWriter());
}
return 0;
- } else if(path == "/jsonrpc") {
- if(reqType_ != RPC_TYPE_JSON) {
- reqType_ = RPC_TYPE_JSON;
- lastBody_.reset(new json::JsonDiskWriter());
- }
- return 0;
}
+#endif // ENABLE_XML_RPC
}
reqType_ = RPC_TYPE_NONE;
lastBody_.reset();