aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-06-19 02:18:29 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-06-19 02:18:29 -0400
commit759f5a856064450acdb4c26839d6d890afb99a17 (patch)
treebc90bdc82a218644a1baa6762105afba6062b7ce /MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs
parent244531f9923bec28f4b1f6d55ad6858bd90f2135 (diff)
update task results
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs
index 6cedaa6a9..1d4829260 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs
@@ -294,7 +294,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
return null;
}
- public object GetStaticFileResult(IRequest requestContext,
+ public Task<object> GetStaticFileResult(IRequest requestContext,
string path,
FileShare fileShare = FileShare.Read)
{
@@ -310,7 +310,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
});
}
- public object GetStaticFileResult(IRequest requestContext,
+ public Task<object> GetStaticFileResult(IRequest requestContext,
StaticFileResultOptions options)
{
var path = options.Path;
@@ -351,7 +351,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
return _fileSystem.GetFileStream(path, FileMode.Open, FileAccess.Read, fileShare);
}
- public object GetStaticResult(IRequest requestContext,
+ public Task<object> GetStaticResult(IRequest requestContext,
Guid cacheKey,
DateTime? lastDateModified,
TimeSpan? cacheDuration,
@@ -372,7 +372,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
});
}
- public object GetStaticResult(IRequest requestContext, StaticResultOptions options)
+ public async Task<object> GetStaticResult(IRequest requestContext, StaticResultOptions options)
{
var cacheKey = options.CacheKey;
options.ResponseHeaders = options.ResponseHeaders ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
@@ -398,7 +398,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
}
var compress = ShouldCompressResponse(requestContext, contentType);
- var hasOptions = GetStaticResult(requestContext, options, compress).Result;
+ var hasOptions = await GetStaticResult(requestContext, options, compress).ConfigureAwait(false);
AddResponseHeaders(hasOptions, options.ResponseHeaders);
return hasOptions;