diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-03-25 08:46:38 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-03-25 08:46:38 -0400 |
| commit | e73d65f20d81c660d54537f20ec5920649ef2868 (patch) | |
| tree | c12249957959e1ea2f50b10160eb61159d8ab681 /MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs | |
| parent | 9b41a3d35c81596e61780413361e5a0c1d4e1065 (diff) | |
fix for m3u8 playlists
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs index 41ef15bc9..d5b8b38c5 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; +using System.Text; using System.Threading.Tasks; using MimeTypes = MediaBrowser.Common.Net.MimeTypes; @@ -74,7 +75,16 @@ namespace MediaBrowser.Server.Implementations.HttpServer } else { - result = new HttpResult(content, contentType); + var text = content as string; + + if (text != null) + { + result = new StreamWriter(Encoding.UTF8.GetBytes(text), contentType, _logger); + } + else + { + result = new HttpResult(content, contentType); + } } } |
