diff --git a/NzbDrone.Api/Extensions/GZipPipeline.cs b/NzbDrone.Api/Extensions/GZipPipeline.cs index 4dac9bc4b..0447c65d6 100644 --- a/NzbDrone.Api/Extensions/GZipPipeline.cs +++ b/NzbDrone.Api/Extensions/GZipPipeline.cs @@ -14,7 +14,9 @@ public static void Handle(NancyContext context) public static Response CompressResponse(this Response response, Request request) { - if (!response.ContentType.Contains("image") && request.Headers.AcceptEncoding.Any(x => x.Contains("gzip"))) + if (!response.ContentType.Contains("image") + && request.Headers.AcceptEncoding.Any(x => x.Contains("gzip")) + && (!response.Headers.ContainsKey("Content-Encoding") || response.Headers["Content-Encoding"] != "gzip")) { var data = new MemoryStream(); response.Contents.Invoke(data); diff --git a/NzbDrone.Api/Frontend/StaticResourceProvider.cs b/NzbDrone.Api/Frontend/StaticResourceProvider.cs index 19ee7f5d1..b2e81fb1a 100644 --- a/NzbDrone.Api/Frontend/StaticResourceProvider.cs +++ b/NzbDrone.Api/Frontend/StaticResourceProvider.cs @@ -59,7 +59,8 @@ public Response ProcessStaticResourceRequest(NancyContext context, string workin response.Headers.DisableCache(); } - return response.CompressResponse(context.Request); + //return response.CompressResponse(context.Request); + return response; } _logger.Warn("File {0} not found", filePath);