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?