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

  • 相关阅读:
    前端开发在手机UC浏览器上遇到的坑
    前端开发在uc浏览器上遇到的坑
    object-fit 解决图片指定大小被压缩问题
    前端新手需要注意的几个问题
    利用apache搭建本地环境
    有简历,为何还要自我介绍?
    移动端项目总结
    JavaScript MVC框架PK:Angular、Backbone、CanJS与Ember(转载)
    Net Core 控制台程序使用Nlog 输出到log文件
    net core服务器缺包,如何在线安装?
  • 原文地址:https://www.cnblogs.com/liujx2019/p/10310138.html
Copyright © 2011-2022 走看看