diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-01-20 20:45:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-20 20:45:06 -0500 |
| commit | c7f648f86a543c889a92a15f9d8d1f95d28987c8 (patch) | |
| tree | cadac43ca42a70a126084e1508fba0b8c4f4fce3 /SocketHttpListener/Net/HttpListenerResponse.Managed.cs | |
| parent | 7e4cc9f513ff583e7a8ecf596e61d33dd9ce41d9 (diff) | |
| parent | 803bf563d74754139ff92810364262e3181e399d (diff) | |
Merge branch 'dev' into imagesize
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(); |
