zoukankan      html  css  js  c++  java
  • [http 1.1] M-POST w3

    5. Mandatory HTTP Requests
    
    An HTTP request is called a mandatory request if it includes at least
    one mandatory extension declaration (using the Man or the C-Man header
    fields). The method name of a mandatory request MUST be prefixed by
    "M-". For example, a client might express the binding rights-
    management constraints in an HTTP PUT request as follows:
    
        M-PUT /a-resource HTTP/1.1
        Man: "http://www.copyright.org/rights-management"; ns=16
        16-copyright: http://www.copyright.org/COPYRIGHT.html
        16-contributions: http://www.copyright.org/PATCHES.html
        Host: www.w3.org
        Content-Length: 1203
        Content-Type: text/html
    
        <!doctype html ...
    
    https://www.w3.org/Protocols/HTTP/ietf-ext-wg/draft-frystyk-http-extensions-03
    
     x x x
    
    
    5.1 Fulfilling a Mandatory Request
    
    A server MUST NOT claim to have fulfilled any mandatory request unless
    it understood and obeyed all the mandatory extension declarations in
    the request. This section defines a mechanism for conveying this
    information to the client in such a way that it interoperates with
    existing HTTP applications and prevents broken servers from giving the
    false impression that an extended request was fulfilled by responding
    with a 200 (Ok) response without understanding the method.
    
    If any end-to-end mandatory extension declarations were among the
    fulfilled extensions then the server MUST include an Ext response
    header field in the response. In order to avoid that the Ext header
    field inadvertently is cached in an HTTP/1.1 cache, the response MUST
    contain a no-cache cache-control directive. If the response is
    otherwise cachable, the no-cache cache-control directive SHOULD be
    limited to only affect the Ext header field:
    
        HTTP/1.1 200 OK
        Ext:
        Cache-Control: no-cache="Ext"
        ...
    
    If the mandatory request has been forwarded by an HTTP/1.0
    intermediary proxy then this is indicated either directly in the
    Request-Line or by the presence of an HTTP/1.1 Via header field. In
    this case, the server MUST include an Expires header field with a date
    equal to or earlier than the value of the Date header field. If the
    response is otherwise cachable by HTTP/1.1 caches, the server SHOULD
    include an appropriate max-age cache-control directive:
    
        HTTP/1.1 200 OK
        Date: Sun, 25 Oct 1998 08:12:31 GMT
        Expires: Sun, 25 Oct 1998 08:12:31 GMT
        Ext:
        Cache-Control: no-cache="Ext", max-age=3600
        ...
    
    If any hop-by-hop mandatory extension declarations were among the
    fulfilled extensions then the server MUST include a C-Ext response
    header field in the response. The C-Ext header field MUST be protected
    by a Connection header field (see [5], section 14.10).
    
        HTTP/1.1 200 OK
        C-Ext:
        Connection: C-Ext
    
    Frystyk, et al                                           [Page 9]
    
    
    
    
    
    
    INTERNET-DRAFT           HTTP Extensions        Wed, Jan 20, 1999
    
    Note, that the Ext and C-Ext header fields are not mutually exclusive;
    they can be both be present in a response when  fulfilling mandatory
    request containing both hop-by-hop as well as end-to-end mandatory
    extension declarations.


    https://www.w3.org/Protocols/HTTP/ietf-ext-wg/draft-frystyk-http-extensions-02

  • 相关阅读:
    分享 | 自定义属于自己的U盘图标
    GIF工具 | 分享几个Gif相关工具
    XTU | 人工智能入门复习总结
    XTU | 物联网概论复习总结
    收纳箱2号 | 前端开发大全
    收纳箱1号 | GitHub Pages部署静态网页的一点私货
    博客 | 基于Travis CI实现Hexo在Github和Coding的同步自动化部署
    图床plus演示 | 图床及在线分享演示文稿工具
    css写实心正三角和倒三角
    React 多个className的写法
  • 原文地址:https://www.cnblogs.com/liujx2019/p/10310138.html
Copyright © 2011-2022 走看看