Expect: 100-continue

‍Expect:100-Continue

(转自http://hi.baidu.com/leo_han/item/9bdd1068bc6f7131ad3e8333

HTTP1.1(RFC2616)中的描述是:

The purpose of the 100 (Continue) status (see section 10.1.1) is to   allow 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. In some cases, it might either be inappropriate or highly   inefficient for the client to send the body if the server will reject   the message without looking at the body.

   Requirements for HTTP/1.1 clients:

      - If a client will wait for a 100 (Continue) response before
        sending the request body, it MUST send an Expect request-header
        field (section 14.20) with the "100-continue" expectation.
      - A client MUST NOT send an Expect request-header field (section
        14.20) with the "100-continue" expectation if it does not intend
        to send a request body.

就是说 ‍Expect:100-Continue的作用是,设定Client 和 Server在Post数据前需要进行 ‍“请求头域” 的数据匹配,相当于是握手。如果匹配则开始进行body 的内容,Post数据。否则,报错(417) Unkown

转载于:https://www.cnblogs.com/jenneyblog/archive/2013/03/07/Expect100continue.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值