Don't compress binary responses

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti 2012-08-30 21:30:33 -04:00
parent db575695e9
commit 4207260657
3 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,4 @@
using System; using System.IO;
using System.IO;
namespace MediaBrowser.ApiInteraction namespace MediaBrowser.ApiInteraction
{ {

View File

@ -77,6 +77,11 @@ namespace MediaBrowser.Common.Net.Handlers
break; break;
} }
} }
public override bool ShouldCompressResponse(string contentType)
{
return SerializationFormat != Handlers.SerializationFormat.Protobuf;
}
} }
public enum SerializationFormat public enum SerializationFormat

View File

@ -8,6 +8,7 @@ using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Common.Kernel; using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Logging;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.IO; using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
@ -15,7 +16,6 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Resolvers; using MediaBrowser.Controller.Resolvers;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Progress; using MediaBrowser.Model.Progress;
using MediaBrowser.Common.Logging;
namespace MediaBrowser.Controller namespace MediaBrowser.Controller
{ {