How do I stop HttpWebRequest from sending an Expect: 100-continue header when POSTing data to a HTTP

  • Thread starter Thread starter furty
  • Start date Start date
F

furty

I've hit a brick wall with this one..

I'm trying to perform a HttpWebRequest that posts form data to the target
server - the problem is that the request *always* contains an Expect:
100-continue header, which on HTTP 1.0 servers results in a 500 error.

None of these seemingly obvious fixes work:

Set the HttpWebRequest.Expect property to null or String.Empty
Set the HttpWebRequest.ProtocolVersion to HttpVersion.Version10

Note that my class works perfectly with HTTP 1.1 servers, so I doubt there's
anything I've done incorrectly in code. Also note that the problem only
surfaces when you POST data to the server with the request, no post data =
no problem.

Searching google for this problem has given me a few people that have hit
the same problem, but not one valid workaround.

Help!
 
Surely someone must have come across this fault before?
Any MVP's want to take up the task?
 
Back
Top