rfc2756.txt

来自「RFC 的详细文档!」· 文本 代码 · 共 844 行 · 第 1/3 页

TXT
844
字号






Network Working Group                                            P. Vixie
Request for Comments: 2756                                            ISC
Category: Experimental                                         D. Wessels
                                                                    NLANR
                                                             January 2000


                 Hyper Text Caching Protocol (HTCP/0.0)


Status of this Memo

   This memo defines an Experimental Protocol for the Internet
   community.  It does not specify an Internet standard of any kind.
   Discussion and suggestions for improvement are requested.
   Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2000).  All Rights Reserved.

Abstract

   This document describes HTCP, a protocol for discovering HTTP caches
   and cached data, managing sets of HTTP caches, and monitoring cache
   activity.  This is an experimental protocol, one among several
   proposals to perform these functions.

1.  Definitions, Rationale and Scope

   1.1.  HTTP/1.1 (see [RFC2616]) permits the transfer of web objects
   from "origin servers," possibly via "proxies" (which are allowed
   under some circumstances to "cache" such objects for subsequent
   reuse) to "clients" which consume the object in some way, usually by
   displaying it as part of a "web page."  HTTP/1.0 and later permit
   "headers" to be included in a request and/or a response, thus
   expanding upon the HTTP/0.9 (and earlier) behaviour of specifying
   only a URI in the request and offering only a body in the response.

   1.2.  ICP (see [RFC2186]) permits caches to be queried as to their
   content, usually by other caches who are hoping to avoid an expensive
   fetch from a distant origin server.  ICP was designed with HTTP/0.9
   in mind, such that only the URI (without any headers) is used when
   describing cached content, and the possibility of multiple compatible
   bodies for the same URI had not yet been imagined.






Vixie & Wessels               Experimental                      [Page 1]

RFC 2756         Hyper Text Caching Protocol (HTCP/0.0)     January 2000


   1.3.  This document specifies a Hyper Text Caching Protocol (HTCP)
   which permits full request and response headers to be used in cache
   management, and expands the domain of cache management to include
   monitoring a remote cache's additions and deletions, requesting
   immediate deletions, and sending hints about web objects such as the
   third party locations of cacheable objects or the measured
   uncacheability or unavailability of web objects.

2.  HTCP Protocol

   2.1.  All multi-octet HTCP protocol elements are transmitted in
   network byte order.  All RESERVED fields should be set to binary zero
   by senders and left unexamined by receivers.  Headers must be
   presented with the CRLF line termination, as in HTTP.

   2.2.  Any hostnames specified should be compatible between sender and
   receiver, such that if a private naming scheme (such as HOSTS.TXT or
   NIS) is in use, names depending on such schemes will only be sent to
   HTCP neighbors who are known to participate in said schemes.  Raw
   addresses (dotted quad IPv4, or colon-format IPv6) are universal, as
   are public DNS names.  Use of private names or addresses will require
   special operational care.

   2.3.  HTCP messages may be sent as UDP datagrams, or over TCP
   connections.  UDP must be supported.  HTCP agents must not be
   isolated from NETWORK failures and delays.  An HTCP agent should be
   prepared to act in useful ways when no response is forthcoming, or
   when responses are delayed or reordered or damaged.  TCP is optional
   and is expected to be used only for protocol debugging.  The IANA has
   assigned port 4827 as the standard TCP and UDP port number for HTCP.

   2.4.  A set of configuration variables concerning transport
   characteristics should be maintained for each agent which is capable
   of initiating HTCP transactions, perhaps with a set of per-agent
   global defaults.  These variables are:

   Maximum number of unacknowledged transactions before a "failure" is
   imputed.

   Maximum interval without a response to some transaction before a
   "failure" is imputed.

   Minimum interval before trying a new transaction after a failure.








Vixie & Wessels               Experimental                      [Page 2]

RFC 2756         Hyper Text Caching Protocol (HTCP/0.0)     January 2000


   2.5. An HTCP Message has the following general format:

   +---------------------+
   |        HEADER       | tells message length and protocol versions
   +---------------------+
   |         DATA        | HTCP message (varies per major version number)
   +---------------------+
   |         AUTH        | optional authentication for transaction
   +---------------------+

   2.6. An HTCP/*.* HEADER has the following format:

                 +0 (MSB)                            +1 (LSB)
      +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
   0: |                             LENGTH                            |
      +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +
   2: |                             LENGTH                            |
      +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
   2: |             MAJOR             |             MINOR             |
      +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

   LENGTH  is the message length, inclusive of all header and data
           octets, including the LENGTH field itself.  This field will
           be equal to the datagram payload size ("record length") if a
           datagram protocol is in use, and can include padding, i.e.,
           not all octets of the message need be used in the DATA and
           AUTH sections.

   MAJOR   is the major version number (0 for this specification).  The
           DATA section of an HTCP message need not be upward or
           downward compatible between different major version numbers.

   MINOR   is the minor version number (0 for this specification).
           Feature levels and interpretation rules can vary depending on
           this field, in particular RESERVED fields can take on new
           (though optional) meaning in successive minor version numbers
           within the same major version number.

   2.6.1.  It is expected that an HTCP initiator will know the version
   number of a prospective HTCP responder, or that the initiator will
   probe using declining values for MINOR and MAJOR (beginning with the
   highest locally supported value) and locally cache the probed version
   number of the responder.

   2.6.2.  Higher MAJOR numbers are to be preferred, as are higher MINOR
   numbers within a particular MAJOR number.





Vixie & Wessels               Experimental                      [Page 3]

RFC 2756         Hyper Text Caching Protocol (HTCP/0.0)     January 2000


   2.7. An HTCP/0.* DATA has the following structure:

                 +0 (MSB)                            +1 (LSB)
      +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
   0: |                             LENGTH                            |
      +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
   2: |    OPCODE     |   RESPONSE    |        RESERVED       |F1 |RR |
      +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
   4: |                           TRANS-ID                            |
      +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +
   6: |                           TRANS-ID                            |
      +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
   8: |                                                               |
      /                            OP-DATA                            /
      /                                                               /
      +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

   LENGTH    is the number of octets of the message which are reserved
             for the DATA section, including the LENGTH field itself.
             This number can include padding, i.e., not all octets
             reserved by LENGTH need be used in OP-DATA.

   OPCODE    is the operation code of an HTCP transaction.  An HTCP
             transaction can consist of multiple HTCP messages, e.g., a
             request (sent by the initiator), or a response (sent by the
             responder).

   RESPONSE  is a numeric code indicating the success or failure of a
             transaction.  It should be set to zero (0) by requestors
             and ignored by responders.  Each operation has its own set
             of response codes, which are described later.  The overall
             message has a set of response codes which are as follows:

             0   authentication wasn't used but is required
             1   authentication was used but unsatisfactorily
             2   opcode not implemented
             3   major version not supported
             4   minor version not supported (major version is ok)
             5   inappropriate, disallowed, or undesirable opcode

             The above response codes all indicate errors and all depend
             for their visibility on MO=1 (as specified below).

   RR        is a flag indicating whether this message is a request (0)
             or response (1).






Vixie & Wessels               Experimental                      [Page 4]

RFC 2756         Hyper Text Caching Protocol (HTCP/0.0)     January 2000


   F1        is overloaded such that it is used differently by
             requestors than by responders.  If RR=0, then F1 is defined
             as RD.  If RR=1, then F1 is defined as MO.

   RD        is a flag which if set to 1 means that a response is
             desired.  Some OPCODEs require RD to be set to 1 to be
             meaningful.

   MO        (em-oh) is a flag which indicates whether the RESPONSE code
             is to be interpreted as a response to the overall message
             (fixed fields in DATA or any field of AUTH) [MO=1] or as a
             response to fields in the OP-DATA [MO=0].

   TRANS-ID  is a 32-bit value which when combined with the initiator's
             network address, uniquely identifies this HTCP transaction.
             Care should be taken not to reuse TRANS-ID's within the
             life-time of a UDP datagram.

   OP-DATA   is opcode-dependent and is defined below, per opcode.

   2.8. An HTCP/0.0 AUTH has the following structure:

                 +0 (MSB)                            +1 (LSB)
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    0: |                             LENGTH                            |
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    2: |                            SIG-TIME                           |
       +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +
    4: |                            SIG-TIME                           |
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    6: |                           SIG-EXPIRE                          |
       +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +   +
    8: |                           SIG-EXPIRE                          |
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
   10: |                                                               |
       /                            KEY-NAME                           /
       /                                                               /
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    n: |                                                               |
       /                            SIGNATURE                          /
       /                                                               /
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+









Vixie & Wessels               Experimental                      [Page 5]

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?