diff options
author | Oren Hurvitz | 2014-03-25 16:20:21 +0200 |
---|---|---|
committer | Oren Hurvitz | 2014-03-25 15:36:59 +0100 |
commit | b1d8aa0b6418a4edba8ce3b7b6f3db78616fd523 (patch) | |
tree | cddba93c37103619e422f1d6c062fcea03c24e22 /OpenSim/Framework/Servers | |
parent | Use log-rolling on the log files (once per day) (diff) | |
download | opensim-SC_OLD-b1d8aa0b6418a4edba8ce3b7b6f3db78616fd523.zip opensim-SC_OLD-b1d8aa0b6418a4edba8ce3b7b6f3db78616fd523.tar.gz opensim-SC_OLD-b1d8aa0b6418a4edba8ce3b7b6f3db78616fd523.tar.bz2 opensim-SC_OLD-b1d8aa0b6418a4edba8ce3b7b6f3db78616fd523.tar.xz |
Use the "Content-Encoding" header to indicate gzipped streams
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index ea7f195..2f7b549 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -833,7 +833,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
833 | 833 | ||
834 | Stream inputStream = Util.Copy(request.InputStream); | 834 | Stream inputStream = Util.Copy(request.InputStream); |
835 | 835 | ||
836 | if (request.ContentType == "application/x-gzip") | 836 | if (request.Headers["Content-Encoding"] == "gzip") |
837 | inputStream = new GZipStream(inputStream, System.IO.Compression.CompressionMode.Decompress); | 837 | inputStream = new GZipStream(inputStream, System.IO.Compression.CompressionMode.Decompress); |
838 | 838 | ||
839 | using (StreamReader reader = new StreamReader(inputStream, Encoding.UTF8)) | 839 | using (StreamReader reader = new StreamReader(inputStream, Encoding.UTF8)) |
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs index 3171759..f36cbbc 100644 --- a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs +++ b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs | |||
@@ -181,7 +181,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
181 | _request = req; | 181 | _request = req; |
182 | _context = context; | 182 | _context = context; |
183 | 183 | ||
184 | if (null != req.Headers["content-encoding"]) | 184 | if ((null != req.Headers["content-encoding"]) && ("gzip" != req.Headers["content-encoding"])) |
185 | _contentEncoding = Encoding.GetEncoding(_request.Headers["content-encoding"]); | 185 | _contentEncoding = Encoding.GetEncoding(_request.Headers["content-encoding"]); |
186 | if (null != req.Headers["content-type"]) | 186 | if (null != req.Headers["content-type"]) |
187 | _contentType = _request.Headers["content-type"]; | 187 | _contentType = _request.Headers["content-type"]; |