|
@@ -30,8 +30,6 @@ namespace SocketHttpListener.Net
|
|
internal bool HeadersSent;
|
|
internal bool HeadersSent;
|
|
internal object headers_lock = new object();
|
|
internal object headers_lock = new object();
|
|
|
|
|
|
- bool force_close_chunked;
|
|
|
|
-
|
|
|
|
private readonly ILogger _logger;
|
|
private readonly ILogger _logger;
|
|
private readonly ITextEncoding _textEncoding;
|
|
private readonly ITextEncoding _textEncoding;
|
|
|
|
|
|
@@ -50,11 +48,6 @@ namespace SocketHttpListener.Net
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- internal bool ForceCloseChunked
|
|
|
|
- {
|
|
|
|
- get { return force_close_chunked; }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public Encoding ContentEncoding
|
|
public Encoding ContentEncoding
|
|
{
|
|
{
|
|
get
|
|
get
|
|
@@ -327,7 +320,7 @@ namespace SocketHttpListener.Net
|
|
headers.Add(name, value);
|
|
headers.Add(name, value);
|
|
}
|
|
}
|
|
|
|
|
|
- void Close(bool force)
|
|
|
|
|
|
+ private void Close(bool force)
|
|
{
|
|
{
|
|
if (force)
|
|
if (force)
|
|
{
|
|
{
|
|
@@ -345,20 +338,6 @@ namespace SocketHttpListener.Net
|
|
Close(false);
|
|
Close(false);
|
|
}
|
|
}
|
|
|
|
|
|
- public void Close(byte[] responseEntity, bool willBlock)
|
|
|
|
- {
|
|
|
|
- if (disposed)
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
- if (responseEntity == null)
|
|
|
|
- throw new ArgumentNullException("responseEntity");
|
|
|
|
-
|
|
|
|
- //TODO: if willBlock -> BeginWrite + Close ?
|
|
|
|
- ContentLength64 = responseEntity.Length;
|
|
|
|
- OutputStream.Write(responseEntity, 0, (int)content_length);
|
|
|
|
- Close(false);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public void Redirect(string url)
|
|
public void Redirect(string url)
|
|
{
|
|
{
|
|
StatusCode = 302; // Found
|
|
StatusCode = 302; // Found
|