Use the "Content-Encoding" header to indicate gzipped streams

This commit is contained in:
Oren Hurvitz
2014-03-25 16:20:21 +02:00
parent 8ecab21b37
commit b1d8aa0b64
4 changed files with 15 additions and 16 deletions

View File

@@ -833,7 +833,7 @@ namespace OpenSim.Framework.Servers.HttpServer
Stream inputStream = Util.Copy(request.InputStream);
if (request.ContentType == "application/x-gzip")
if (request.Headers["Content-Encoding"] == "gzip")
inputStream = new GZipStream(inputStream, System.IO.Compression.CompressionMode.Decompress);
using (StreamReader reader = new StreamReader(inputStream, Encoding.UTF8))