From 5bfcbd4e9e07880a55cd88be031b523832186d93 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 31 May 2017 15:21:32 -0400 Subject: update dlna profiles --- .../HttpServer/HttpResultFactory.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'Emby.Server.Implementations/HttpServer/HttpResultFactory.cs') diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index 0af88595f..6c37d5f7a 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -58,6 +58,18 @@ namespace Emby.Server.Implementations.HttpServer return GetHttpResult(content, contentType, true, responseHeaders); } + public object GetRedirectResult(string url) + { + var responseHeaders = new Dictionary(); + responseHeaders["Location"] = url; + + var result = new HttpResult(new byte[] { }, "text/plain", HttpStatusCode.Redirect); + + AddResponseHeaders(result, responseHeaders); + + return result; + } + /// /// Gets the HTTP result. /// @@ -599,9 +611,9 @@ namespace Emby.Server.Implementations.HttpServer } } - private async Task GetCompressedResult(Stream stream, - string requestedCompressionType, - IDictionary responseHeaders, + private async Task GetCompressedResult(Stream stream, + string requestedCompressionType, + IDictionary responseHeaders, bool isHeadRequest, string contentType) { -- cgit v1.2.3