How do I supress the Expect: 100-continue header from being sent with a HttpWebRequest Post?
-
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 couple of people that have hit the same problem, but not one valid workaround. Help!