diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-05-31 15:21:32 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-05-31 15:21:32 -0400 |
| commit | 5bfcbd4e9e07880a55cd88be031b523832186d93 (patch) | |
| tree | 72560ff07a80af5cffdfaadbf399e8b9cf46fc32 /Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | |
| parent | d8ec7109ab5ec561254465e1664974049cc556d7 (diff) | |
update dlna profiles
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpResultFactory.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | 18 |
1 files changed, 15 insertions, 3 deletions
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<string, string>(); + responseHeaders["Location"] = url; + + var result = new HttpResult(new byte[] { }, "text/plain", HttpStatusCode.Redirect); + + AddResponseHeaders(result, responseHeaders); + + return result; + } + /// <summary> /// Gets the HTTP result. /// </summary> @@ -599,9 +611,9 @@ namespace Emby.Server.Implementations.HttpServer } } - private async Task<IHasHeaders> GetCompressedResult(Stream stream, - string requestedCompressionType, - IDictionary<string,string> responseHeaders, + private async Task<IHasHeaders> GetCompressedResult(Stream stream, + string requestedCompressionType, + IDictionary<string, string> responseHeaders, bool isHeadRequest, string contentType) { |
