2

It doesn't send it by just setting the property, it apparently only sends after calling Response.Close(). But then the stream stays closed and the client can't send the body anymore. How do I send a HttpStatusCode.Continue response while still being able to read the request body and write a new response?

                context.Response.StatusCode = (int)HttpStatusCode.Continue;
                context.Response.KeepAlive = true;
                context.Response.Close();
                // cannot access disposed object!!
                using (var body = context.Request.InputStream) {} 
Blub
  • 13,014
  • 18
  • 75
  • 102
  • I believe that the system should do this for you [automatically](http://stackoverflow.com/questions/879120/supporting-the-expect-100-continue-header-with-asp-net-mvc) – Damien_The_Unbeliever May 13 '15 at 08:27
  • doesnt seem to be true, I'm getting the request with no body and Expect: 100-continue header. So I have to respond to that myself, no? Otherwise it doesnt work – Blub May 13 '15 at 08:34

0 Answers0