summaryrefslogtreecommitdiff
path: root/src/HttpServer.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-09-02 21:04:36 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-09-02 21:04:36 +0900
commit2148cbaf1d97790e28788e745badef75227b4cba (patch)
tree5f7f3d673f8edcf2940fd3a564759c2cf3a6f961 /src/HttpServer.cc
parent46491fc5b7a4ce4244af9d78f1648afe51b8286c (diff)
Fixed compile error without XML library
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();