Switched http compression from gzip to deflate

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti 2012-08-05 14:58:24 -04:00
parent debc4e6ae5
commit ecfffba494
3 changed files with 7 additions and 7 deletions

View File

@ -39,7 +39,7 @@ namespace MediaBrowser.ApiInteraction
public BaseClient(HttpClientHandler clientHandler)
{
clientHandler.AutomaticDecompression = DecompressionMethods.GZip;
clientHandler.AutomaticDecompression = DecompressionMethods.Deflate;
HttpClient = new HttpClient(clientHandler);
}

View File

@ -73,7 +73,7 @@ namespace MediaBrowser.Common.Net.Handlers
}
}
public virtual bool GzipResponse
public virtual bool CompressResponse
{
get
{
@ -92,11 +92,11 @@ namespace MediaBrowser.Common.Net.Handlers
private void WriteReponse(Stream stream)
{
if (GzipResponse)
if (CompressResponse)
{
using (GZipStream gzipStream = new GZipStream(stream, CompressionMode.Compress, false))
using (DeflateStream compressedStream = new DeflateStream(stream, CompressionLevel.Fastest, false))
{
WriteResponseToOutputStream(gzipStream);
WriteResponseToOutputStream(compressedStream);
}
}
else

View File

@ -60,9 +60,9 @@ namespace MediaBrowser.Common.Net
{
Response.SendChunked = true;
if (handler.GzipResponse)
if (handler.CompressResponse)
{
Response.AddHeader("Content-Encoding", "gzip");
Response.AddHeader("Content-Encoding", "deflate");
}
if (cacheDuration.Ticks > 0)