summaryrefslogtreecommitdiff
path: root/src/HttpServerBodyCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-22 14:09:39 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-22 14:09:39 +0000
commit06a52cad02bec8740eaaf357f3404d241136f830 (patch)
tree440492a6602b15b7d74e02fc7d10023dab566049 /src/HttpServerBodyCommand.cc
parent5d8864caedd849ed98fbdb86282124b2b47e6090 (diff)
2010-01-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
aria2 now returns gzip compressed XML-RPC response if XML-RPC client accepts gzip content encoding. * src/A2STR.cc * src/A2STR.h * src/GZipEncoder.cc * src/GZipEncoder.h * src/HttpHeader.cc * src/HttpHeader.h * src/HttpServer.cc * src/HttpServer.h * src/HttpServerBodyCommand.cc * src/HttpServerCommand.cc * src/Makefile.am * src/XmlRpcResponse.cc * src/XmlRpcResponse.h * test/GZipEncoderTest.cc * test/Makefile.am
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
-rw-r--r--src/HttpServerBodyCommand.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc
index 07ac5d7a..25eeab47 100644
--- a/src/HttpServerBodyCommand.cc
+++ b/src/HttpServerBodyCommand.cc
@@ -90,7 +90,9 @@ bool HttpServerBodyCommand::execute()
SharedHandle<xmlrpc::XmlRpcMethod> method =
xmlrpc::XmlRpcMethodFactory::create(req._methodName);
xmlrpc::XmlRpcResponse res = method->execute(req, _e);
- _httpServer->feedResponse(res.toXml(), "text/xml");
+ bool gzip = _httpServer->supportsGZip();
+ std::string responseData = res.toXml(gzip);
+ _httpServer->feedResponse(responseData, "text/xml");
Command* command =
new HttpServerResponseCommand(cuid, _httpServer, _e, _socket);
_e->commands.push_back(command);