aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Net/HttpConnection.cs
diff options
context:
space:
mode:
Diffstat (limited to 'SocketHttpListener/Net/HttpConnection.cs')
-rw-r--r--SocketHttpListener/Net/HttpConnection.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/SocketHttpListener/Net/HttpConnection.cs b/SocketHttpListener/Net/HttpConnection.cs
index 9c87ff076..79491d6f9 100644
--- a/SocketHttpListener/Net/HttpConnection.cs
+++ b/SocketHttpListener/Net/HttpConnection.cs
@@ -25,7 +25,7 @@ namespace SocketHttpListener.Net
StringBuilder _currentLine;
ListenerPrefix _prefix;
HttpRequestStream _requestStream;
- Stream _responseStream;
+ HttpResponseStream _responseStream;
bool _chunked;
int _reuses;
bool _contextBound;
@@ -202,7 +202,7 @@ namespace SocketHttpListener.Net
return _requestStream;
}
- public Stream GetResponseStream(bool isExpect100Continue = false)
+ public HttpResponseStream GetResponseStream(bool isExpect100Continue = false)
{
// TODO: can we get this _stream before reading the input?
if (_responseStream == null)
@@ -423,14 +423,14 @@ namespace SocketHttpListener.Net
HttpListenerResponse response = _context.Response;
response.StatusCode = status;
response.ContentType = "text/html";
- string description = HttpListenerResponse.GetStatusDescription(status);
+ string description = HttpStatusDescription.Get(status);
string str;
if (msg != null)
str = string.Format("<h1>{0} ({1})</h1>", description, msg);
else
str = string.Format("<h1>{0}</h1>", description);
- byte[] error = Encoding.Default.GetBytes(str);
+ byte[] error = _textEncoding.GetDefaultEncoding().GetBytes(str);
response.Close(error, false);
}
catch