diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-12 20:07:48 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-12 20:07:48 -0500 |
| commit | 0a03d7ad9fe6554b78963445f012464023113614 (patch) | |
| tree | db7c353f9759d6d4259ee3fc017b569cba6f383c /Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | |
| parent | a6e7438987ebd0ef2c44940f76e6efd487803e02 (diff) | |
localization fixes
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpResultFactory.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index e78446bc8..3f756fc7a 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -13,10 +13,10 @@ using System.Text; using System.Threading.Tasks; using System.Xml; using Emby.Server.Implementations.HttpServer; +using Emby.Server.Implementations.Services; using MediaBrowser.Model.IO; using MediaBrowser.Model.Services; using ServiceStack; -using ServiceStack.Host; using IRequest = MediaBrowser.Model.Services.IRequest; using MimeTypes = MediaBrowser.Model.Net.MimeTypes; using StreamWriter = Emby.Server.Implementations.HttpServer.StreamWriter; @@ -203,7 +203,11 @@ namespace Emby.Server.Implementations.HttpServer // Do not use the memoryStreamFactory here, they don't place nice with compression using (var ms = new MemoryStream()) { - ContentTypes.Instance.SerializeToStream(request, dto, ms); + var contentType = request.ResponseContentType; + var writerFn = RequestHelper.GetResponseWriter(contentType); + + writerFn(dto, ms); + ms.Position = 0; var responseHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); |
