HTTP/1.1 - Header

zeige nach Typ: [ Allgemein  | Request  | Response  | Alle ]

Request Header

Cookie

Beispiel:
Cookie: $Version="1"; Customer="WILE_E_COYOTE"; $Path="/acme"
Original Beschreibung (engl.):
   When it sends a request to an origin server, the user agent sends a
   Cookie request header to the origin server if it has cookies that are
   applicable to the request, based on

   * the request-host;

   * the request-URI;

   * the cookie's age.

   The syntax for the header is:

   cookie          =       "Cookie:" cookie-version
                           1*((";" | ",") cookie-value)
   cookie-value    =       NAME "=" VALUE [";" path] [";" domain]
   cookie-version  =       "$Version" "=" value
   NAME            =       attr
   VALUE           =       value
   path            =       "$Path" "=" value
   domain          =       "$Domain" "=" value

   The value of the cookie-version attribute must be the value from the
   Version attribute, if any, of the corresponding Set-Cookie response
   header.  Otherwise the value for cookie-version is 0.  The value for
   the path attribute must be the value from the Path attribute, if any,
   of the corresponding Set-Cookie response header.  Otherwise the
   attribute should be omitted from the Cookie request header.  The
   value for the domain attribute must be the value from the Domain
   attribute, if any, of the corresponding Set-Cookie response header.
   Otherwise the attribute should be omitted from the Cookie request
   header.

   Note that there is no Comment attribute in the Cookie request header
   corresponding to the one in the Set-Cookie response header.  The user
   agent does not return the comment information to the origin server.

   The following rules apply to choosing applicable cookie-values from
   among all the cookies the user agent has.

   Domain Selection
        The origin server's fully-qualified host name must domain-match
        the Domain attribute of the cookie.

   Path Selection
        The Path attribute of the cookie must match a prefix of the
        request-URI.

   Max-Age Selection
        Cookies that have expired should have been discarded and thus
        are not forwarded to an origin server.


   If multiple cookies satisfy the criteria above, they are ordered in
   the Cookie header such that those with more specific Path attributes
   precede those with less specific.  Ordering with respect to other
   attributes (e.g., Domain) is unspecified.

   Note: For backward compatibility, the separator in the Cookie header
   is semi-colon (;) everywhere.  A server should also accept comma (,)
   as the separator between cookie-values for future compatibility.