diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-28 00:38:41 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-28 00:38:41 -0500 |
| commit | 56b24da15165ef4c4b7107b673bab5b191d76afe (patch) | |
| tree | 2e0462593fed108f1807caeb76a3b6692a55e049 /SocketHttpListener.Portable/Net/HttpConnection.cs | |
| parent | 4a548f30811bb8aeee689bec90773b36398078e9 (diff) | |
update response stream parsing
Diffstat (limited to 'SocketHttpListener.Portable/Net/HttpConnection.cs')
| -rw-r--r-- | SocketHttpListener.Portable/Net/HttpConnection.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/SocketHttpListener.Portable/Net/HttpConnection.cs b/SocketHttpListener.Portable/Net/HttpConnection.cs index b09d02254..4b54fc013 100644 --- a/SocketHttpListener.Portable/Net/HttpConnection.cs +++ b/SocketHttpListener.Portable/Net/HttpConnection.cs @@ -209,7 +209,9 @@ namespace SocketHttpListener.Net // TODO: can we get this stream before reading the input? if (o_stream == null) { - if (context.Response.SendChunked || isExpect100Continue || context.Response.ContentLength64 <= 0) + context.Response.DetermineIfChunked(); + + if (context.Response.SendChunked || isExpect100Continue || context.Request.IsWebSocketRequest) { o_stream = new ResponseStream(stream, context.Response, _memoryStreamFactory, _textEncoding); } |
