views:

88

answers:

3

Hi there!

Does anyone of you has ever seen a real life occurence of the HTTP "Expect" header? Or any proxy or server answering with a "100 Continue"-Status Message? Do popular HTTP servers like IIS or Apache ever encounter situations where a "100 Continue" is returned?

Thanks, Max

A: 

Yes, Expect: 100-Continue is used by System.Net.HttpWebRequest in .NET, for example, and all modern web servers recognize it (it's part of the HTTP/1.1 standard).

It is used mainly when a file is uploaded via POST (but can be used with any POST request), so that the client can know if the request can be successful before sending the potentially big data.

A 100-Continue response does not mean the request WILL be successful, it means that the parameters the server already knows are ok (eg: it won't throw a 4xx code, for example), and if the rest is ok as well, then the request will be successful.

FWH
A: 

The .net System.Net.HttpWebRequest sends an Expect: 100-continue on every post request by default. Tomcat, at least, sends a 100-continue before executing the servlet.

Tim Sylvester
+1  A: 

libcurl will add the "Expect: 100-Continue" Header if the content of a POST request exceeds 1024 bytes.

At least since 2003 SUN refuses to add support for this header to the servlet API. Java web application inside servel containers have no ability to control 100 Continue responses.

Most servlet contianer implementations will immediately send this response whenever an "Expect: 100-Continue" is received.

mkoeller