diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-05-05 14:00:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-05 14:00:51 -0400 |
| commit | b0dd8c1b7542e0a7c0d58fa5bdca4e69ca174746 (patch) | |
| tree | 5954918c4e814326ee674ea0e850a9ddcb15eb7e /Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | |
| parent | 6e53aa0e076c2ce2bd7b1a462196b099c77f90e5 (diff) | |
| parent | 91cb7e06e9934d43740f8899a30a771625a08be3 (diff) | |
Merge pull request #2614 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpResultFactory.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index 310161d41..687bd62b0 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -501,7 +501,7 @@ namespace Emby.Server.Implementations.HttpServer private bool ShouldCompressResponse(IRequest requestContext, string contentType) { // It will take some work to support compression with byte range requests - if (!string.IsNullOrEmpty(requestContext.Headers.Get("Range"))) + if (!string.IsNullOrWhiteSpace(requestContext.Headers.Get("Range"))) { return false; } @@ -566,7 +566,7 @@ namespace Emby.Server.Implementations.HttpServer }; } - if (!string.IsNullOrEmpty(rangeHeader)) + if (!string.IsNullOrWhiteSpace(rangeHeader)) { var stream = await factoryFn().ConfigureAwait(false); @@ -621,6 +621,7 @@ namespace Emby.Server.Implementations.HttpServer responseHeaders["Content-Encoding"] = requestedCompressionType; } + responseHeaders["Vary"] = "Accept-Encoding"; responseHeaders["Content-Length"] = content.Length.ToString(UsCulture); if (isHeadRequest) |
