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

  • 相关阅读:
    深入研究Servlet线程安全性问题
    Sun公司java语言编码规范
    JAVA的内省机制(introspector)与反射机制(reflection)[转]
    Oracle的悲观锁和乐观锁
    java中120个经典问题
    自定义Java异常
    Java事务处理总结
    Tomcat内存溢出的三种情况及解决办法分析
    .net基础
    C#.Net中的转义
  • 原文地址:https://www.cnblogs.com/liujx2019/p/10310138.html
Copyright © 2011-2022 走看看