diff options
| author | Matt Montgomery <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-07-26 16:14:58 -0500 |
|---|---|---|
| committer | Matt Montgomery <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-07-26 16:14:58 -0500 |
| commit | a40fe867762ee8b538848b164952d951c3534485 (patch) | |
| tree | 747a24b766e9a66339edaa45433103095e735814 /Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | |
| parent | e2f16fc2551592541846c2bd34f27773f33aae7e (diff) | |
| parent | 8ab800508bb140d8671125245a64c9d27adcad13 (diff) | |
Merge remote-tracking branch 'upstream/master' into quickconnect
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpResultFactory.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index ad31b3e1e..970f5119c 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -426,7 +426,7 @@ namespace Emby.Server.Implementations.HttpServer /// </summary> private object GetCachedResult(IRequest requestContext, IDictionary<string, string> responseHeaders, StaticResultOptions options) { - bool noCache = (requestContext.Headers[HeaderNames.CacheControl].ToString()).IndexOf("no-cache", StringComparison.OrdinalIgnoreCase) != -1; + bool noCache = requestContext.Headers[HeaderNames.CacheControl].ToString().IndexOf("no-cache", StringComparison.OrdinalIgnoreCase) != -1; AddCachingHeaders(responseHeaders, options.CacheDuration, noCache, options.DateLastModified); if (!noCache) @@ -585,7 +585,7 @@ namespace Emby.Server.Implementations.HttpServer if (!string.IsNullOrWhiteSpace(rangeHeader) && totalContentLength.HasValue) { - var hasHeaders = new RangeRequestWriter(rangeHeader, totalContentLength.Value, stream, contentType, isHeadRequest, _logger) + var hasHeaders = new RangeRequestWriter(rangeHeader, totalContentLength.Value, stream, contentType, isHeadRequest) { OnComplete = options.OnComplete }; @@ -622,8 +622,11 @@ namespace Emby.Server.Implementations.HttpServer /// <summary> /// Adds the caching responseHeaders. /// </summary> - private void AddCachingHeaders(IDictionary<string, string> responseHeaders, TimeSpan? cacheDuration, - bool noCache, DateTime? lastModifiedDate) + private void AddCachingHeaders( + IDictionary<string, string> responseHeaders, + TimeSpan? cacheDuration, + bool noCache, + DateTime? lastModifiedDate) { if (noCache) { |
