« Parsing simple grammars using only a single Regex | Main | Clipboard transfer to Excel is broken »

HttpWebRequest POST Expect 100-continue

The only way the HttpWebRequest will generate a POST method request is using the HTTP 1.1 Expect header set to at least 100-continue. This has the effect of not including the posted data with the initial request, but rather waiting for the server to request the content. This is intended to allow the server to return an error before you ship it a ton of stuff it doesn’t want but is clearly slower for the 99% of traffic that knows what to post where.

Some servers (like www.jobsearch.org) don’t understand the Expect header and respond with a protocol error.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)