Please note: older simulators (0.7.6) still send the info about gzip in ContentType

bullet-2.82
Diva Canto 2014-05-04 11:41:52 -07:00
parent 5a10da3ee8
commit 7f570636f8
1 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ namespace OpenSim.Server.Handlers.Simulation
}
Stream inputStream = request;
if ((httpRequest.Headers["Content-Encoding"] == "gzip") || (httpRequest.Headers["X-Content-Encoding"] == "gzip"))
if ((httpRequest.ContentType == "application/x-gzip" || httpRequest.Headers["Content-Encoding"] == "gzip") || (httpRequest.Headers["X-Content-Encoding"] == "gzip"))
inputStream = new GZipStream(inputStream, CompressionMode.Decompress);
StreamReader reader = new StreamReader(inputStream, encoding);
@ -454,7 +454,7 @@ namespace OpenSim.Server.Handlers.Simulation
keysvals.Add("querystringkeys", querystringkeys);
Stream inputStream = request;
if ((httpRequest.Headers["Content-Encoding"] == "gzip") || (httpRequest.Headers["X-Content-Encoding"] == "gzip"))
if ((httpRequest.ContentType == "application/x-gzip" || httpRequest.Headers["Content-Encoding"] == "gzip") || (httpRequest.Headers["X-Content-Encoding"] == "gzip"))
inputStream = new GZipStream(inputStream, CompressionMode.Decompress);
Encoding encoding = Encoding.UTF8;