• Expect: 100continue


    ‍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
  • 相关阅读:
    GitHub设置添加SSH
    Django之Cookie、Session、CSRF、Admin
    Django之强大的Form功能
    Django之Model
    前端:DOM
    前端:JavaScript
    前端:CSS的知识点拾遗
    前端:CSS
    前端:HTML
    Python:线程、进程和协程
  • 原文地址:https://www.cnblogs.com/jenneyblog/p/Expect100continue.html
Copyright © 2020-2023  润新知