diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-01-22 14:09:39 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-01-22 14:09:39 +0000 |
| commit | 06a52cad02bec8740eaaf357f3404d241136f830 (patch) | |
| tree | 440492a6602b15b7d74e02fc7d10023dab566049 /src/HttpServerBodyCommand.cc | |
| parent | 5d8864caedd849ed98fbdb86282124b2b47e6090 (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.cc | 4 |
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); |
