26
votes

The HTTP/1.1 spec allows for clients to send an Expect: 100-continue header for large request payloads (8.2.3 Use of the 100 (Continue) Status - Hypertext Transfer Protocol -- HTTP/1.1 - RFC2616).

This will pause the request after the headers have been sent and allow the server to reject it based on those headers.

If those headers did not indicate a bad request (e.g. a too large Content-Length), then it responds with a 100 Continue status line, allowing the client to proceed. At this point the client sends the request body.

Which browsers actually support this, and under which conditions will they send the expect header?

1
Please explain why you want to know what browsers implement this behavior. If you want to test stuff, there are other tools than browsers.CodeCaster
@CodeCaster Being able to rely on it for pre-validating huge uploads would be nice. But I'm mostly just curious.igorw
I would like to know as well. Our load test software (MS Visual Studio) sends the "Expect:100-continue" header and seems to cause problems with our load balancer. When I disable it from using that header, it works fine. If no browser is sending the "Expect:100-continue" header, then I see no reason to worry about the issues that our load balancer has with the 100-continue header and can continue to disable our load tests from sending that header.Makotosan

1 Answers

5
votes

I know that curl does this for every post request. Was just running over that some time ago.

I also tested that in conjunction with PHP in "How can I stop cURL from using 100 Continue?".