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/HttpListenerResponse.cs | |
| parent | 4a548f30811bb8aeee689bec90773b36398078e9 (diff) | |
update response stream parsing
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; |
