diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-05-31 15:28:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-31 15:28:03 -0400 |
| commit | 4e10daf646e0788409f2bc52ef70effa2616e3f3 (patch) | |
| tree | 72560ff07a80af5cffdfaadbf399e8b9cf46fc32 /Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | |
| parent | 6c5fe7935b5c684526117de7472a6c34903aad44 (diff) | |
| parent | 5bfcbd4e9e07880a55cd88be031b523832186d93 (diff) | |
Merge pull request #2676 from MediaBrowser/dev
Dev
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) { |
