在分析这个问题之前我们需要了解一下什么是“Expect 100 Continue”和它到底是怎么去影响我们的http请求的,我们可以先看一下官方的解释是:
Activates 'Expect: 100-Continue' handshake for the entity enclosing methods. The 'Expect: 100-Continue' handshake allows a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body.
The use of the 'Expect: 100-continue' handshake can result in noticeable performance improvement for entity enclosing requests (such asPOST
andPUT
) that require the target server's authentication.
'Expect: 100-continue' handshake should be used with caution, as it may cause problems with HTTP servers and proxies that do not supportHTTP/1.1
protocol.
Expect 100 Contin