diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-05-14 12:59:52 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-05-14 12:59:52 +0000 |
| commit | 92b3f57ac9df461d6340037e9ef7140d0233750d (patch) | |
| tree | 58c5acebcfc3a6e2848856155b593062667202d7 /src/HttpServerBodyCommand.cc | |
| parent | dd6d098ccbe41d9e3cf67f6049ea5c3b88cddeb0 (diff) | |
2009-05-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added XmlRpcResponse class. XmlRpcMethod::execute() now returns
XmlRpcResponse.
* src/HttpServerBodyCommand.cc
* src/Makefile.am
* src/XmlRpcMethod.cc
* src/XmlRpcMethod.h
* src/XmlRpcMethodImpl.cc
* src/XmlRpcResponse.cc
* src/XmlRpcResponse.h
* test/XmlRpcMethodTest.cc
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
| -rw-r--r-- | src/HttpServerBodyCommand.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc index a302a690..b5f7b482 100644 --- a/src/HttpServerBodyCommand.cc +++ b/src/HttpServerBodyCommand.cc @@ -48,6 +48,7 @@ #include "XmlRpcRequestParserStateMachine.h" #include "XmlRpcMethod.h" #include "XmlRpcMethodFactory.h" +#include "XmlRpcResponse.h" namespace aria2 { @@ -86,8 +87,8 @@ bool HttpServerBodyCommand::execute() SharedHandle<xmlrpc::XmlRpcMethod> method = xmlrpc::XmlRpcMethodFactory::create(req._methodName); - std::string response = method->execute(req, _e); - _httpServer->feedResponse(response, "text/xml"); + xmlrpc::XmlRpcResponse res = method->execute(req, _e); + _httpServer->feedResponse(res.toXml(), "text/xml"); Command* command = new HttpServerResponseCommand(cuid, _httpServer, _e, _socket); command->setStatus(Command::STATUS_ONESHOT_REALTIME); |
