From 60508e1dd8a25be58dea308e5f48ff0c596f97c8 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 11 Jan 2014 22:29:47 -0500 Subject: [PATCH] reverting http result factory change --- .../HttpServer/HttpResultFactory.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs index 2419320a54..9359261c56 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -360,19 +360,11 @@ namespace MediaBrowser.Server.Implementations.HttpServer var compress = ShouldCompressResponse(requestContext, contentType); - var hasOptions = GetStaticResult(requestContext, responseHeaders, contentType, factoryFn, compress, isHeadRequest); + var hasOptions = GetStaticResult(requestContext, responseHeaders, contentType, factoryFn, compress, isHeadRequest).Result; - return GetStaticResultTask(hasOptions, responseHeaders); - } - - private async Task GetStaticResultTask(Task optionsTask, - IEnumerable> responseHeaders) - { - var options = await optionsTask.ConfigureAwait(false); - - AddResponseHeaders(options, responseHeaders); + AddResponseHeaders(hasOptions, responseHeaders); - return options; + return hasOptions; } /// @@ -670,4 +662,4 @@ namespace MediaBrowser.Server.Implementations.HttpServer throw error; } } -} +} \ No newline at end of file