Mercurial > hg > orthanc
diff Core/RestApi/RestApi.cpp @ 1514:d73a2178b319
support of deflate and gzip content-types
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 10 Aug 2015 16:43:59 +0200 |
parents | 7962563129c9 |
children | c94353fbd4e9 |
line wrap: on
line diff
--- a/Core/RestApi/RestApi.cpp Mon Aug 10 16:01:37 2015 +0200 +++ b/Core/RestApi/RestApi.cpp Mon Aug 10 16:43:59 2015 +0200 @@ -205,12 +205,15 @@ for (size_t i = 0; i < encodings.size(); i++) { std::string s = Toolbox::StripSpaces(encodings[i]); + if (s == "deflate") { - wrappedOutput.SetHttpCompression(HttpCompression_Deflate); + wrappedOutput.AllowDeflateCompression(true); } - - // TODO HttpCompression_Gzip ? + else if (s == "gzip") + { + wrappedOutput.AllowGzipCompression(true); + } } } }