diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-12 19:30:03 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-12 19:30:03 -0500 |
| commit | 38c216a61a3dc389d1ddab2a37b4b032a6de13d0 (patch) | |
| tree | 014986191dfe763ecda08e212e3bbe4998e4b36a /SocketHttpListener.Portable/Net/HttpConnection.cs | |
| parent | 102bbe2beb76fa76b21f4ed3f7c584a58d787204 (diff) | |
update response streams
Diffstat (limited to 'SocketHttpListener.Portable/Net/HttpConnection.cs')
| -rw-r--r-- | SocketHttpListener.Portable/Net/HttpConnection.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/SocketHttpListener.Portable/Net/HttpConnection.cs b/SocketHttpListener.Portable/Net/HttpConnection.cs index 67dd5c958..d9fd97ed2 100644 --- a/SocketHttpListener.Portable/Net/HttpConnection.cs +++ b/SocketHttpListener.Portable/Net/HttpConnection.cs @@ -204,12 +204,12 @@ namespace SocketHttpListener.Net return i_stream; } - public Stream GetResponseStream(HttpListenerRequest request) + public Stream GetResponseStream(bool isExpect100Continue = false) { // TODO: can we get this stream before reading the input? if (o_stream == null) { - if (context.Response.SendChunked || request == null || request.HasExpect100Continue) + if (context.Response.SendChunked || isExpect100Continue) { o_stream = new ResponseStream(stream, context.Response, _memoryStreamFactory, _textEncoding); } @@ -490,7 +490,7 @@ namespace SocketHttpListener.Net { if (!context.Request.IsWebSocketRequest || force_close) { - Stream st = GetResponseStream(context.Request); + Stream st = GetResponseStream(); if (st != null) st.Dispose(); |
