diff options
Diffstat (limited to 'SocketHttpListener.Portable/Net/HttpListenerResponse.cs')
| -rw-r--r-- | SocketHttpListener.Portable/Net/HttpListenerResponse.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/SocketHttpListener.Portable/Net/HttpListenerResponse.cs b/SocketHttpListener.Portable/Net/HttpListenerResponse.cs index 880473c0a..c1182de34 100644 --- a/SocketHttpListener.Portable/Net/HttpListenerResponse.cs +++ b/SocketHttpListener.Portable/Net/HttpListenerResponse.cs @@ -362,6 +362,22 @@ namespace SocketHttpListener.Net return false; } + public void DetermineIfChunked() + { + if (chunked) + { + return ; + } + + Version v = context.Request.ProtocolVersion; + if (!cl_set && !chunked && v >= HttpVersion.Version11) + chunked = true; + if (!chunked && string.Equals(headers["Transfer-Encoding"], "chunked")) + { + chunked = true; + } + } + internal void SendHeaders(bool closing, MemoryStream ms) { Encoding encoding = content_encoding; |
