diff options
Diffstat (limited to 'SocketHttpListener.Portable/Net/HttpListenerRequest.cs')
| -rw-r--r-- | SocketHttpListener.Portable/Net/HttpListenerRequest.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/SocketHttpListener.Portable/Net/HttpListenerRequest.cs b/SocketHttpListener.Portable/Net/HttpListenerRequest.cs index 5631fc0a1..767f1c542 100644 --- a/SocketHttpListener.Portable/Net/HttpListenerRequest.cs +++ b/SocketHttpListener.Portable/Net/HttpListenerRequest.cs @@ -179,16 +179,21 @@ namespace SocketHttpListener.Net } } - if (String.Compare(Headers["Expect"], "100-continue", StringComparison.OrdinalIgnoreCase) == 0) + if (HasExpect100Continue) { - var output = context.Connection.GetResponseStream(); - + var output = (ResponseStream)context.Connection.GetResponseStream(this); + var _100continue = _textEncoding.GetASCIIEncoding().GetBytes("HTTP/1.1 100 Continue\r\n\r\n"); - //output.InternalWrite(_100continue, 0, _100continue.Length); + output.InternalWrite(_100continue, 0, _100continue.Length); } } + public bool HasExpect100Continue + { + get { return String.Compare(Headers["Expect"], "100-continue", StringComparison.OrdinalIgnoreCase) == 0; } + } + static bool MaybeUri(string s) { int p = s.IndexOf(':'); |
