Which browsers send the expect: 100-continue heade

2019-02-02 22:48发布

问题:

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:

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?".



标签: http browser