aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener.Portable/Net/HttpListenerRequest.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-12 17:46:38 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-12 17:46:38 -0500
commit102bbe2beb76fa76b21f4ed3f7c584a58d787204 (patch)
treea9a860b560395bb8c87251cd0a0c992e812373c9 /SocketHttpListener.Portable/Net/HttpListenerRequest.cs
parent1714cb8764f2311fd255945d5a03d6b298f62071 (diff)
fix mono project
Diffstat (limited to 'SocketHttpListener.Portable/Net/HttpListenerRequest.cs')
-rw-r--r--SocketHttpListener.Portable/Net/HttpListenerRequest.cs13
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(':');