aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-07-17 18:21:35 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-07-17 18:21:35 -0400
commit06118307dd95b0834d67f3ae0604e3ffaf04af2a (patch)
tree499aca87a2a7a6cc7f435e426450688e0a12f92d /MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs
parent80eda34f9f18a890dcec79cb927323376d2cfdfa (diff)
disable chunked encoding for images
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs
index 8831d635c..6a60e5ea6 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs
@@ -306,11 +306,15 @@ namespace MediaBrowser.Server.Implementations.HttpServer
throw new ArgumentNullException("path");
}
- return GetStaticFileResult(requestContext, path, MimeTypes.GetMimeType(path), fileShare, responseHeaders, isHeadRequest);
+ return GetStaticFileResult(requestContext, path, MimeTypes.GetMimeType(path), null, fileShare, responseHeaders, isHeadRequest);
}
- public object GetStaticFileResult(IRequest requestContext, string path, string contentType,
- FileShare fileShare = FileShare.Read, IDictionary<string, string> responseHeaders = null,
+ public object GetStaticFileResult(IRequest requestContext,
+ string path,
+ string contentType,
+ TimeSpan? cacheCuration = null,
+ FileShare fileShare = FileShare.Read,
+ IDictionary<string, string> responseHeaders = null,
bool isHeadRequest = false)
{
if (string.IsNullOrEmpty(path))
@@ -327,7 +331,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
var cacheKey = path + dateModified.Ticks;
- return GetStaticResult(requestContext, cacheKey.GetMD5(), dateModified, null, contentType, () => Task.FromResult(GetFileStream(path, fileShare)), responseHeaders, isHeadRequest);
+ return GetStaticResult(requestContext, cacheKey.GetMD5(), dateModified, cacheCuration, contentType, () => Task.FromResult(GetFileStream(path, fileShare)), responseHeaders, isHeadRequest);
}
/// <summary>