From b35dcbb9f02c27d2d84ee3281a60d654a3fb1259 Mon Sep 17 00:00:00 2001 From: cvium Date: Wed, 16 Jan 2019 20:50:40 +0100 Subject: Remove MediaBrowser.Text since it violates licenses and is overall hacky --- SocketHttpListener/Net/HttpListenerResponse.Managed.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'SocketHttpListener/Net/HttpListenerResponse.Managed.cs') 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(); -- cgit v1.2.3