diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-01-20 10:33:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-20 10:33:59 -0500 |
| commit | acb9afd908f979a6155f7967bc379829c2b9c894 (patch) | |
| tree | 5f1aeb1bb826a412a40328cb80095c3dc09b66f8 /SocketHttpListener/Net/HttpListenerResponse.Managed.cs | |
| parent | 3a5e3ade01ab4b4fccca03ba2da969f03d5564f1 (diff) | |
| parent | 2dc14aa85d7123e8c97e6e868d661fb91e32440c (diff) | |
Merge pull request #598 from cvium/remove_textencoding
Remove MediaBrowser.Text for license violations and hackiness
Diffstat (limited to 'SocketHttpListener/Net/HttpListenerResponse.Managed.cs')
| -rw-r--r-- | SocketHttpListener/Net/HttpListenerResponse.Managed.cs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/SocketHttpListener/Net/HttpListenerResponse.Managed.cs b/SocketHttpListener/Net/HttpListenerResponse.Managed.cs index 9f9b8384d..f595fce7c 100644 --- a/SocketHttpListener/Net/HttpListenerResponse.Managed.cs +++ b/SocketHttpListener/Net/HttpListenerResponse.Managed.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.IO; using System.Net; @@ -6,8 +6,6 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.IO; -using MediaBrowser.Model.Text; -using SocketHttpListener.Primitives; namespace SocketHttpListener.Net { @@ -18,12 +16,10 @@ namespace SocketHttpListener.Net private int _statusCode = 200; internal object _headersLock = new object(); private bool _forceCloseChunked; - private ITextEncoding _textEncoding; - internal HttpListenerResponse(HttpListenerContext context, ITextEncoding textEncoding) + internal HttpListenerResponse(HttpListenerContext context) { _httpContext = context; - _textEncoding = textEncoding; } internal bool ForceCloseChunked => _forceCloseChunked; @@ -263,7 +259,7 @@ namespace SocketHttpListener.Net ComputeCookies(); } - var encoding = _textEncoding.GetDefaultEncoding(); + var encoding = Encoding.UTF8; var writer = new StreamWriter(ms, encoding, 256); writer.Write("HTTP/1.1 {0} ", _statusCode); // "1.1" matches Windows implementation, which ignores the response version writer.Flush(); |
