mirror of https://github.com/aria2/aria2
Fixed compile error without XML library
parent
46491fc5b7
commit
2148cbaf1d
|
@ -330,19 +330,22 @@ int HttpServer::setupResponseRecv()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else if(getMethod() == "POST") {
|
} else if(getMethod() == "POST") {
|
||||||
if(path == "/rpc") {
|
if(path == "/jsonrpc") {
|
||||||
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) {
|
if(reqType_ != RPC_TYPE_JSON) {
|
||||||
reqType_ = RPC_TYPE_JSON;
|
reqType_ = RPC_TYPE_JSON;
|
||||||
lastBody_.reset(new json::JsonDiskWriter());
|
lastBody_.reset(new json::JsonDiskWriter());
|
||||||
}
|
}
|
||||||
return 0;
|
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;
|
||||||
|
}
|
||||||
|
#endif // ENABLE_XML_RPC
|
||||||
}
|
}
|
||||||
reqType_ = RPC_TYPE_NONE;
|
reqType_ = RPC_TYPE_NONE;
|
||||||
lastBody_.reset();
|
lastBody_.reset();
|
||||||
|
|
|
@ -239,7 +239,8 @@ SRCS = Socket.h\
|
||||||
UnknownOptionException.cc UnknownOptionException.h\
|
UnknownOptionException.cc UnknownOptionException.h\
|
||||||
Notifier.cc Notifier.h\
|
Notifier.cc Notifier.h\
|
||||||
ValueBaseDiskWriter.h\
|
ValueBaseDiskWriter.h\
|
||||||
AnonDiskWriterFactory.h
|
AnonDiskWriterFactory.h\
|
||||||
|
XmlRpcRequestParserController.cc XmlRpcRequestParserController.h
|
||||||
|
|
||||||
if MINGW_BUILD
|
if MINGW_BUILD
|
||||||
SRCS += WinConsoleFile.cc WinConsoleFile.h
|
SRCS += WinConsoleFile.cc WinConsoleFile.h
|
||||||
|
@ -271,8 +272,7 @@ SRCS += ExpatXmlParser.cc ExpatXmlParser.h
|
||||||
endif # HAVE_LIBEXPAT
|
endif # HAVE_LIBEXPAT
|
||||||
|
|
||||||
if ENABLE_XML_RPC
|
if ENABLE_XML_RPC
|
||||||
SRCS += XmlRpcRequestParserController.cc XmlRpcRequestParserController.h\
|
SRCS += XmlRpcRequestParserStateMachine.cc XmlRpcRequestParserStateMachine.h\
|
||||||
XmlRpcRequestParserStateMachine.cc XmlRpcRequestParserStateMachine.h\
|
|
||||||
XmlRpcRequestParserState.h\
|
XmlRpcRequestParserState.h\
|
||||||
XmlRpcRequestParserStateImpl.cc XmlRpcRequestParserStateImpl.h\
|
XmlRpcRequestParserStateImpl.cc XmlRpcRequestParserStateImpl.h\
|
||||||
XmlRpcDiskWriter.cc XmlRpcDiskWriter.h
|
XmlRpcDiskWriter.cc XmlRpcDiskWriter.h
|
||||||
|
|
Loading…
Reference in New Issue