Changeset 311 for draft-ietf-httpbis/orig/rfc2965.html
- Timestamp:
- 22/08/08 11:56:21 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/orig/rfc2965.html
r227 r311 1 1 2 <!DOCTYPE html 2 3 PUBLIC "-//W3C//DTD HTML 4.01//EN"> 3 <html lang="en"> 4 <head profile="http://www.w3.org/2006/03/hcard"> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 6 <title>HTTP State Management Mechanism</title><style type="text/css" title="Xml2Rfc (sans serif)"> 4 <html lang="en"><head profile="http://www.w3.org/2006/03/hcard"> 5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 6 <title>HTTP State Management Mechanism</title><style type="text/css" title="Xml2Rfc (sans serif)"> 7 7 a { 8 8 text-decoration: none; … … 331 331 } 332 332 } 333 </style><link rel="Contents" href="#rfc.toc"> 334 <link rel="Author" href="#rfc.authors"> 335 <link rel="Copyright" href="#rfc.copyright"> 336 <link rel="Index" href="#rfc.index"> 337 <link rel="Chapter" title="1 TERMINOLOGY" href="#rfc.section.1"> 338 <link rel="Chapter" title="2 STATE AND SESSIONS" href="#rfc.section.2"> 339 <link rel="Chapter" title="3 DESCRIPTION" href="#rfc.section.3"> 340 <link rel="Chapter" title="4 EXAMPLES" href="#rfc.section.4"> 341 <link rel="Chapter" title="5 IMPLEMENTATION CONSIDERATIONS" href="#rfc.section.5"> 342 <link rel="Chapter" title="6 PRIVACY" href="#rfc.section.6"> 343 <link rel="Chapter" title="7 SECURITY CONSIDERATIONS" href="#rfc.section.7"> 344 <link rel="Chapter" title="8 OTHER, SIMILAR, PROPOSALS" href="#rfc.section.8"> 345 <link rel="Chapter" title="9 HISTORICAL" href="#rfc.section.9"> 346 <link rel="Chapter" title="10 ACKNOWLEDGEMENTS" href="#rfc.section.10"> 347 <link rel="Chapter" href="#rfc.section.11" title="11 References"> 348 <link rel="Alternate" title="Authorative ASCII version" href="http://www.ietf.org/rfc/rfc2965.txt"> 349 <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.362, 2008-02-29 17:10:19, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/"> 350 <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"> 351 <meta name="DC.Creator" content="Kristol, D. M."> 352 <meta name="DC.Creator" content="Montulli, L."> 353 <meta name="DC.Identifier" content="urn:ietf:rfc:2965"> 354 <meta name="DC.Date.Issued" scheme="ISO8601" content="2000-10"> 355 <meta name="DC.Relation.Replaces" content="urn:ietf:rfc:2109"> 356 <meta name="DC.Description.Abstract" content="This document specifies a way to create a stateful session with Hypertext Transfer Protocol (HTTP) requests and responses. It describes three new headers, Cookie, Cookie2, and Set-Cookie2, which carry state information between participating origin servers and user agents. The method described here differs from Netscape's Cookie proposal , but it can interoperate with HTTP/1.0 user agents that use Netscape's method. (See the HISTORICAL section.) This document reflects implementation experience with RFC 2109 and obsoletes it."> 357 </head> 358 <body> 359 <table summary="header information" class="header" border="0" cellpadding="1" cellspacing="1"> 360 <tr> 361 <td class="header left">Network Working Group</td> 362 <td class="header right">D. M. Kristol</td> 363 </tr> 364 <tr> 365 <td class="header left">Request for Comments: 2965</td> 366 <td class="header right">Bell Laboratories, Lucent Technologies</td> 367 </tr> 368 <tr> 369 <td class="header left">Obsoletes: <a href="http://tools.ietf.org/html/rfc2109">2109</a></td> 370 <td class="header right">L. Montulli</td> 371 </tr> 372 <tr> 373 <td class="header left">Category: Standards Track</td> 374 <td class="header right">Epinions.com, Inc.</td> 375 </tr> 376 <tr> 377 <td class="header left"></td> 378 <td class="header right">October 2000</td> 379 </tr> 380 </table> 381 <p class="title">HTTP State Management Mechanism</p> 382 <h1><a id="rfc.status" href="#rfc.status">Status of this Memo</a></h1> 383 <p>This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions 384 for improvements. Please refer to the current edition of the “Internet Official Protocol Standards” (STD 1) for the standardization 385 state and status of this protocol. Distribution of this memo is unlimited. 386 </p> 387 <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1> 388 <p>Copyright © The Internet Society (2000). All Rights Reserved.</p> 389 <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1> 390 <p>This document specifies a way to create a stateful session with Hypertext Transfer Protocol (HTTP) requests and responses. 391 It describes three new headers, Cookie, Cookie2, and Set-Cookie2, which carry state information between participating origin 392 servers and user agents. The method described here differs from Netscape's Cookie proposal <a href="#Netscape" id="rfc.xref.Netscape.1"><cite title="Persistent Client State -- HTTP Cookies">[Netscape]</cite></a>, but it can interoperate with HTTP/1.0 user agents that use Netscape's method. (See the HISTORICAL section.) 393 </p> 394 <p>This document reflects implementation experience with RFC 2109 and obsoletes it.</p> 395 <hr class="noprint"> 396 <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1> 397 <ul class="toc"> 398 <li class="tocline0">1. <a href="#rfc.section.1">TERMINOLOGY</a><ul class="toc"> 399 <li class="tocline1">1.1 <a href="#rfc.section.1.1">Requirements</a></li> 400 </ul> 401 </li> 402 <li class="tocline0">2. <a href="#rfc.section.2">STATE AND SESSIONS</a></li> 403 <li class="tocline0">3. <a href="#rfc.section.3">DESCRIPTION</a><ul class="toc"> 404 <li class="tocline1">3.1 <a href="#rfc.section.3.1">Syntax: General</a></li> 405 <li class="tocline1">3.2 <a href="#rfc.section.3.2">Origin Server Role</a><ul class="toc"> 406 <li class="tocline1">3.2.1 <a href="#rfc.section.3.2.1">General</a></li> 407 <li class="tocline1">3.2.2 <a href="#rfc.section.3.2.2">Set-Cookie2 Syntax</a></li> 408 <li class="tocline1">3.2.3 <a href="#rfc.section.3.2.3">Controlling Caching</a></li> 409 </ul> 410 </li> 411 <li class="tocline1">3.3 <a href="#rfc.section.3.3">User Agent Role</a><ul class="toc"> 412 <li class="tocline1">3.3.1 <a href="#rfc.section.3.3.1">Interpreting Set-Cookie2</a></li> 413 <li class="tocline1">3.3.2 <a href="#rfc.section.3.3.2">Rejecting Cookies</a></li> 414 <li class="tocline1">3.3.3 <a href="#rfc.section.3.3.3">Cookie Management</a></li> 415 <li class="tocline1">3.3.4 <a href="#rfc.section.3.3.4">Sending Cookies to the Origin Server</a></li> 416 <li class="tocline1">3.3.5 <a href="#rfc.section.3.3.5">Identifying What Version is Understood: Cookie2</a></li> 417 <li class="tocline1">3.3.6 <a href="#rfc.section.3.3.6">Sending Cookies in Unverifiable Transactions</a></li> 418 </ul> 419 </li> 420 <li class="tocline1">3.4 <a href="#rfc.section.3.4">How an Origin Server Interprets the Cookie Header</a></li> 421 <li class="tocline1">3.5 <a href="#rfc.section.3.5">Caching Proxy Role</a></li> 422 </ul> 423 </li> 424 <li class="tocline0">4. <a href="#rfc.section.4">EXAMPLES</a><ul class="toc"> 425 <li class="tocline1">4.1 <a href="#rfc.section.4.1">Example 1</a></li> 426 <li class="tocline1">4.2 <a href="#rfc.section.4.2">Example 2</a></li> 427 </ul> 428 </li> 429 <li class="tocline0">5. <a href="#rfc.section.5">IMPLEMENTATION CONSIDERATIONS</a><ul class="toc"> 430 <li class="tocline1">5.1 <a href="#rfc.section.5.1">Set-Cookie2 Content</a></li> 431 <li class="tocline1">5.2 <a href="#rfc.section.5.2">Stateless Pages</a></li> 432 <li class="tocline1">5.3 <a href="#rfc.section.5.3">Implementation Limits</a><ul class="toc"> 433 <li class="tocline1">5.3.1 <a href="#rfc.section.5.3.1">Denial of Service Attacks</a></li> 434 </ul> 435 </li> 436 </ul> 437 </li> 438 <li class="tocline0">6. <a href="#rfc.section.6">PRIVACY</a><ul class="toc"> 439 <li class="tocline1">6.1 <a href="#rfc.section.6.1">User Agent Control</a></li> 440 <li class="tocline1">6.2 <a href="#rfc.section.6.2">Origin Server Role</a></li> 441 <li class="tocline1">6.3 <a href="#rfc.section.6.3">Clear Text</a></li> 442 </ul> 443 </li> 444 <li class="tocline0">7. <a href="#rfc.section.7">SECURITY CONSIDERATIONS</a><ul class="toc"> 445 <li class="tocline1">7.1 <a href="#rfc.section.7.1">Protocol Design</a></li> 446 <li class="tocline1">7.2 <a href="#rfc.section.7.2">Cookie Spoofing</a></li> 447 <li class="tocline1">7.3 <a href="#rfc.section.7.3">Unexpected Cookie Sharing</a></li> 448 <li class="tocline1">7.4 <a href="#rfc.section.7.4">Cookies For Account Information</a></li> 449 </ul> 450 </li> 451 <li class="tocline0">8. <a href="#rfc.section.8">OTHER, SIMILAR, PROPOSALS</a></li> 452 <li class="tocline0">9. <a href="#rfc.section.9">HISTORICAL</a><ul class="toc"> 453 <li class="tocline1">9.1 <a href="#rfc.section.9.1">Compatibility with Existing Implementations</a></li> 454 <li class="tocline1">9.2 <a href="#rfc.section.9.2">Caching and HTTP/1.0</a></li> 455 </ul> 456 </li> 457 <li class="tocline0">10. <a href="#rfc.section.10">ACKNOWLEDGEMENTS</a></li> 458 <li class="tocline0">11. <a href="#rfc.references">References</a></li> 459 <li class="tocline0"><a href="#rfc.authors">Authors' Addresses</a></li> 460 <li class="tocline0"><a href="#rfc.ipr">Intellectual Property and Copyright Statements</a></li> 461 <li class="tocline0"><a href="#rfc.index">Index</a></li> 462 </ul> 463 <hr class="noprint"> 464 <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> TERMINOLOGY 465 </h1> 466 <p id="rfc.section.1.p.1">The terms user agent, client, server, proxy, origin server, and http_URL have the same meaning as in the HTTP/1.1 specification <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>. The terms abs_path and absoluteURI have the same meaning as in the URI Syntax specification <a href="#RFC2396" id="rfc.xref.RFC2396.1"><cite title="Uniform Resource Identifiers (URI): Generic Syntax">[RFC2396]</cite></a>. 467 </p> 468 <p id="rfc.section.1.p.2">Host name (HN) means either the host domain name (HDN) or the numeric Internet Protocol (IP) address of a host. The fully 469 qualified domain name is preferred; use of numeric IP addresses is strongly discouraged. 470 </p> 471 <p id="rfc.section.1.p.3">The terms request-host and request-URI refer to the values the client would send to the server as, respectively, the host 472 (but not port) and abs_path portions of the absoluteURI (http_URL) of the HTTP request line. Note that request-host is a HN. 473 </p> 474 <p id="rfc.section.1.p.4">The term effective host name is related to host name. If a host name contains no dots, the effective host name is that name 475 with the string .local appended to it. Otherwise the effective host name is the same as the host name. Note that all effective 476 host names contain at least one dot. 477 </p> 478 <p id="rfc.section.1.p.5">The term request-port refers to the port portion of the absoluteURI (http_URL) of the HTTP request line. If the absoluteURI 479 has no explicit port, the request-port is the HTTP default, 80. The request-port of a cookie is the request-port of the request 480 in which a Set-Cookie2 response header was returned to the user agent. 481 </p> 482 <p id="rfc.section.1.p.6">Host names can be specified either as an IP address or a HDN string. Sometimes we compare one host name with another. (Such 483 comparisons <em class="bcp14">SHALL</em> be case-insensitive.) Host A's name domain-matches host B's if 484 </p> 485 <ul> 486 <li>their host name strings string-compare equal; or</li> 487 <li>A is a HDN string and has the form NB, where N is a non-empty name string, B has the form .B', and B' is a HDN string. (So, 488 x.y.com domain-matches .Y.com but not Y.com.) 489 </li> 490 </ul> 491 <p id="rfc.section.1.p.7">Note that domain-match is not a commutative operation: a.b.c.com domain-matches .c.com, but not the reverse.</p> 492 <p id="rfc.section.1.p.8">The reach R of a host name H is defined as follows: </p> 493 <ul> 494 <li>If 495 <ul> 496 <li>H is the host domain name of a host; and,</li> 497 <li>H has the form A.B; and</li> 498 <li>A has no embedded (that is, interior) dots; and</li> 499 <li>B has at least one embedded dot, or B is the string "local". then the reach of H is .B.</li> 500 </ul> 501 </li> 502 <li>Otherwise, the reach of H is H.</li> 503 </ul> 504 <p id="rfc.section.1.p.9">For two strings that represent paths, P1 and P2, P1 path-matches P2 if P2 is a prefix of P1 (including the case where P1 and 505 P2 string- compare equal). Thus, the string /tec/waldo path-matches /tec. 506 </p> 507 <p id="rfc.section.1.p.10">Because it was used in Netscape's original implementation of state management, we will use the term cookie to refer to the 508 state information that passes between an origin server and user agent, and that gets stored by the user agent. 509 </p> 510 <h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a> Requirements 511 </h2> 512 <p id="rfc.section.1.1.p.1">The key words "MAY", "MUST", "MUST NOT", "OPTIONAL", "RECOMMENDED", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT" 513 in this document are to be interpreted as described in RFC 2119 <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>. 514 </p> 515 <hr class="noprint"> 516 <h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a> STATE AND SESSIONS 517 </h1> 518 <p id="rfc.section.2.p.1">This document describes a way to create stateful sessions with HTTP requests and responses. Currently, HTTP servers respond 519 to each client request without relating that request to previous or subsequent requests; the state management mechanism allows 520 clients and servers that wish to exchange state information to place HTTP requests and responses within a larger context, 521 which we term a "session". This context might be used to create, for example, a "shopping cart", in which user selections 522 can be aggregated before purchase, or a magazine browsing system, in which a user's previous reading affects which offerings 523 are presented. 524 </p> 525 <p id="rfc.section.2.p.2">Neither clients nor servers are required to support cookies. A server <em class="bcp14">MAY</em> refuse to provide content to a client that does not return the cookies it sends. 526 </p> 527 <hr class="noprint"> 528 <h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a> DESCRIPTION 529 </h1> 530 <p id="rfc.section.3.p.1">We describe here a way for an origin server to send state information to the user agent, and for the user agent to return 531 the state information to the origin server. The goal is to have a minimal impact on HTTP and user agents. 532 </p> 533 <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> Syntax: General 534 </h2> 535 <p id="rfc.section.3.1.p.1">The two state management headers, Set-Cookie2 and Cookie, have common syntactic properties involving attribute-value pairs. 536 The following grammar uses the notation, and tokens DIGIT (decimal digits), token (informally, a sequence of non-special, 537 non-white space characters), and http_URL from the HTTP/1.1 specification <a href="#RFC2616" id="rfc.xref.RFC2616.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> to describe their syntax. 538 </p> 539 <div id="rfc.figure.u.1"></div><pre class="inline"> 333 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyright"><link rel="Index" href="#rfc.index"><link rel="Chapter" title="1 TERMINOLOGY" href="#rfc.section.1"><link rel="Chapter" title="2 STATE AND SESSIONS" href="#rfc.section.2"><link rel="Chapter" title="3 DESCRIPTION" href="#rfc.section.3"><link rel="Chapter" title="4 EXAMPLES" href="#rfc.section.4"><link rel="Chapter" title="5 IMPLEMENTATION CONSIDERATIONS" href="#rfc.section.5"><link rel="Chapter" title="6 PRIVACY" href="#rfc.section.6"><link rel="Chapter" title="7 SECURITY CONSIDERATIONS" href="#rfc.section.7"><link rel="Chapter" title="8 OTHER, SIMILAR, PROPOSALS" href="#rfc.section.8"><link rel="Chapter" title="9 HISTORICAL" href="#rfc.section.9"><link rel="Chapter" title="10 ACKNOWLEDGEMENTS" href="#rfc.section.10"><link rel="Chapter" href="#rfc.section.11" title="11 References"><link rel="Alternate" title="Authorative ASCII version" href="http://www.ietf.org/rfc/rfc2965.txt"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.389, 2008-08-20 14:21:35, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.Creator" content="Kristol, D. M."><meta name="DC.Creator" content="Montulli, L."><meta name="DC.Identifier" content="urn:ietf:rfc:2965"><meta name="DC.Date.Issued" scheme="ISO8601" content="2000-10"><meta name="DC.Relation.Replaces" content="urn:ietf:rfc:2109"><meta name="DC.Description.Abstract" content="This document specifies a way to create a stateful session with Hypertext Transfer Protocol (HTTP) requests and responses. It describes three new headers, Cookie, Cookie2, and Set-Cookie2, which carry state information between participating origin servers and user agents. The method described here differs from Netscape's Cookie proposal , but it can interoperate with HTTP/1.0 user agents that use Netscape's method. (See the HISTORICAL section.) This document reflects implementation experience with RFC 2109 and obsoletes it."></head><body><table summary="header information" class="header" border="0" cellpadding="1" cellspacing="1"><tr><td class="header left">Network Working Group</td><td class="header right">D. M. Kristol</td></tr><tr><td class="header left">Request for Comments: 2965</td><td class="header right">Bell Laboratories, Lucent Technologies</td></tr><tr><td class="header left">Obsoletes: <a href="http://tools.ietf.org/html/rfc2109">2109</a></td><td class="header right">L. Montulli</td></tr><tr><td class="header left">Category: Standards Track</td><td class="header right">Epinions.com, Inc.</td></tr><tr><td class="header left"></td><td class="header right">October 2000</td></tr></table><p class="title">HTTP State Management Mechanism</p><h1><a id="rfc.status" href="#rfc.status">Status of this Memo</a></h1><p>This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the “Internet Official Protocol Standards” (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.</p><h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1><p>Copyright © The Internet Society (2000). All Rights Reserved.</p><h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1> <p>This document specifies a way to create a stateful session with Hypertext Transfer Protocol (HTTP) requests and responses. It describes three new headers, Cookie, Cookie2, and Set-Cookie2, which carry state information between participating origin servers and user agents. The method described here differs from Netscape's Cookie proposal <a href="#Netscape" id="rfc.xref.Netscape.1"><cite title="Persistent Client State -- HTTP Cookies">[Netscape]</cite></a>, but it can interoperate with HTTP/1.0 user agents that use Netscape's method. (See the HISTORICAL section.)</p><p>This document reflects implementation experience with RFC 2109 and obsoletes it.</p> <hr class="noprint"><h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1><ul class="toc"><li class="tocline0">1. <a href="#rfc.section.1">TERMINOLOGY</a><ul class="toc"><li class="tocline1">1.1 <a href="#rfc.section.1.1">Requirements</a></li></ul></li><li class="tocline0">2. <a href="#rfc.section.2">STATE AND SESSIONS</a></li><li class="tocline0">3. <a href="#rfc.section.3">DESCRIPTION</a><ul class="toc"><li class="tocline1">3.1 <a href="#rfc.section.3.1">Syntax: General</a></li><li class="tocline1">3.2 <a href="#rfc.section.3.2">Origin Server Role</a><ul class="toc"><li class="tocline1">3.2.1 <a href="#rfc.section.3.2.1">General</a></li><li class="tocline1">3.2.2 <a href="#rfc.section.3.2.2">Set-Cookie2 Syntax</a></li><li class="tocline1">3.2.3 <a href="#rfc.section.3.2.3">Controlling Caching</a></li></ul></li><li class="tocline1">3.3 <a href="#rfc.section.3.3">User Agent Role</a><ul class="toc"><li class="tocline1">3.3.1 <a href="#rfc.section.3.3.1">Interpreting Set-Cookie2</a></li><li class="tocline1">3.3.2 <a href="#rfc.section.3.3.2">Rejecting Cookies</a></li><li class="tocline1">3.3.3 <a href="#rfc.section.3.3.3">Cookie Management</a></li><li class="tocline1">3.3.4 <a href="#rfc.section.3.3.4">Sending Cookies to the Origin Server</a></li><li class="tocline1">3.3.5 <a href="#rfc.section.3.3.5">Identifying What Version is Understood: Cookie2</a></li><li class="tocline1">3.3.6 <a href="#rfc.section.3.3.6">Sending Cookies in Unverifiable Transactions</a></li></ul></li><li class="tocline1">3.4 <a href="#rfc.section.3.4">How an Origin Server Interprets the Cookie Header</a></li><li class="tocline1">3.5 <a href="#rfc.section.3.5">Caching Proxy Role</a></li></ul></li><li class="tocline0">4. <a href="#rfc.section.4">EXAMPLES</a><ul class="toc"><li class="tocline1">4.1 <a href="#rfc.section.4.1">Example 1</a></li><li class="tocline1">4.2 <a href="#rfc.section.4.2">Example 2</a></li></ul></li><li class="tocline0">5. <a href="#rfc.section.5">IMPLEMENTATION CONSIDERATIONS</a><ul class="toc"><li class="tocline1">5.1 <a href="#rfc.section.5.1">Set-Cookie2 Content</a></li><li class="tocline1">5.2 <a href="#rfc.section.5.2">Stateless Pages</a></li><li class="tocline1">5.3 <a href="#rfc.section.5.3">Implementation Limits</a><ul class="toc"><li class="tocline1">5.3.1 <a href="#rfc.section.5.3.1">Denial of Service Attacks</a></li></ul></li></ul></li><li class="tocline0">6. <a href="#rfc.section.6">PRIVACY</a><ul class="toc"><li class="tocline1">6.1 <a href="#rfc.section.6.1">User Agent Control</a></li><li class="tocline1">6.2 <a href="#rfc.section.6.2">Origin Server Role</a></li><li class="tocline1">6.3 <a href="#rfc.section.6.3">Clear Text</a></li></ul></li><li class="tocline0">7. <a href="#rfc.section.7">SECURITY CONSIDERATIONS</a><ul class="toc"><li class="tocline1">7.1 <a href="#rfc.section.7.1">Protocol Design</a></li><li class="tocline1">7.2 <a href="#rfc.section.7.2">Cookie Spoofing</a></li><li class="tocline1">7.3 <a href="#rfc.section.7.3">Unexpected Cookie Sharing</a></li><li class="tocline1">7.4 <a href="#rfc.section.7.4">Cookies For Account Information</a></li></ul></li><li class="tocline0">8. <a href="#rfc.section.8">OTHER, SIMILAR, PROPOSALS</a></li><li class="tocline0">9. <a href="#rfc.section.9">HISTORICAL</a><ul class="toc"><li class="tocline1">9.1 <a href="#rfc.section.9.1">Compatibility with Existing Implementations</a></li><li class="tocline1">9.2 <a href="#rfc.section.9.2">Caching and HTTP/1.0</a></li></ul></li><li class="tocline0">10. <a href="#rfc.section.10">ACKNOWLEDGEMENTS</a></li><li class="tocline0">11. <a href="#rfc.references">References</a></li><li class="tocline0"><a href="#rfc.authors">Authors' Addresses</a></li><li class="tocline0"><a href="#rfc.ipr">Intellectual Property and Copyright Statements</a></li><li class="tocline0"><a href="#rfc.index">Index</a></li></ul><hr class="noprint"><h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a> TERMINOLOGY</h1><p id="rfc.section.1.p.1">The terms user agent, client, server, proxy, origin server, and http_URL have the same meaning as in the HTTP/1.1 specification <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>. The terms abs_path and absoluteURI have the same meaning as in the URI Syntax specification <a href="#RFC2396" id="rfc.xref.RFC2396.1"><cite title="Uniform Resource Identifiers (URI): Generic Syntax">[RFC2396]</cite></a>.</p><p id="rfc.section.1.p.2">Host name (HN) means either the host domain name (HDN) or the numeric Internet Protocol (IP) address of a host. The fully qualified domain name is preferred; use of numeric IP addresses is strongly discouraged.</p><p id="rfc.section.1.p.3">The terms request-host and request-URI refer to the values the client would send to the server as, respectively, the host (but not port) and abs_path portions of the absoluteURI (http_URL) of the HTTP request line. Note that request-host is a HN.</p><p id="rfc.section.1.p.4">The term effective host name is related to host name. If a host name contains no dots, the effective host name is that name with the string .local appended to it. Otherwise the effective host name is the same as the host name. Note that all effective host names contain at least one dot.</p><p id="rfc.section.1.p.5">The term request-port refers to the port portion of the absoluteURI (http_URL) of the HTTP request line. If the absoluteURI has no explicit port, the request-port is the HTTP default, 80. The request-port of a cookie is the request-port of the request in which a Set-Cookie2 response header was returned to the user agent.</p><p id="rfc.section.1.p.6">Host names can be specified either as an IP address or a HDN string. Sometimes we compare one host name with another. (Such comparisons <em class="bcp14">SHALL</em> be case-insensitive.) Host A's name domain-matches host B's if </p><ul><li>their host name strings string-compare equal; or</li><li>A is a HDN string and has the form NB, where N is a non-empty name string, B has the form .B', and B' is a HDN string. (So, x.y.com domain-matches .Y.com but not Y.com.)</li></ul><p id="rfc.section.1.p.7">Note that domain-match is not a commutative operation: a.b.c.com domain-matches .c.com, but not the reverse.</p><p id="rfc.section.1.p.8">The reach R of a host name H is defined as follows: </p><ul><li>If <ul><li>H is the host domain name of a host; and,</li><li>H has the form A.B; and</li><li>A has no embedded (that is, interior) dots; and</li><li>B has at least one embedded dot, or B is the string "local". then the reach of H is .B.</li></ul> </li><li>Otherwise, the reach of H is H.</li></ul><p id="rfc.section.1.p.9">For two strings that represent paths, P1 and P2, P1 path-matches P2 if P2 is a prefix of P1 (including the case where P1 and P2 string- compare equal). Thus, the string /tec/waldo path-matches /tec.</p><p id="rfc.section.1.p.10">Because it was used in Netscape's original implementation of state management, we will use the term cookie to refer to the state information that passes between an origin server and user agent, and that gets stored by the user agent.</p><h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a> Requirements</h2><p id="rfc.section.1.1.p.1">The key words "MAY", "MUST", "MUST NOT", "OPTIONAL", "RECOMMENDED", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT" in this document are to be interpreted as described in RFC 2119 <a href="#RFC2119" id="rfc.xref.RFC2119.1"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.</p><hr class="noprint"><h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a> STATE AND SESSIONS</h1><p id="rfc.section.2.p.1">This document describes a way to create stateful sessions with HTTP requests and responses. Currently, HTTP servers respond to each client request without relating that request to previous or subsequent requests; the state management mechanism allows clients and servers that wish to exchange state information to place HTTP requests and responses within a larger context, which we term a "session". This context might be used to create, for example, a "shopping cart", in which user selections can be aggregated before purchase, or a magazine browsing system, in which a user's previous reading affects which offerings are presented.</p><p id="rfc.section.2.p.2">Neither clients nor servers are required to support cookies. A server <em class="bcp14">MAY</em> refuse to provide content to a client that does not return the cookies it sends.</p><hr class="noprint"><h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a> DESCRIPTION</h1><p id="rfc.section.3.p.1">We describe here a way for an origin server to send state information to the user agent, and for the user agent to return the state information to the origin server. The goal is to have a minimal impact on HTTP and user agents.</p><h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> Syntax: General</h2><p id="rfc.section.3.1.p.1">The two state management headers, Set-Cookie2 and Cookie, have common syntactic properties involving attribute-value pairs. The following grammar uses the notation, and tokens DIGIT (decimal digits), token (informally, a sequence of non-special, non-white space characters), and http_URL from the HTTP/1.1 specification <a href="#RFC2616" id="rfc.xref.RFC2616.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> to describe their syntax.</p><div id="rfc.figure.u.1"></div><pre class="inline"> 540 334 av-pairs = av-pair *(";" av-pair) 541 335 av-pair = attr ["=" value] ; optional value 542 336 attr = token 543 337 value = token | quoted-string 544 </pre><p id="rfc.section.3.1.p.3">Attributes (names) (attr) are case-insensitive. White space is permitted between tokens. Note that while the above syntax 545 description shows value as optional, most attrs require them. 546 </p> 547 <p id="rfc.section.3.1.p.4">NOTE: The syntax above allows whitespace between the attribute and the = sign.</p> 548 <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> Origin Server Role 549 </h2> 550 <h3 id="rfc.section.3.2.1"><a href="#rfc.section.3.2.1">3.2.1</a> General 551 </h3> 552 <p id="rfc.section.3.2.1.p.1">The origin server initiates a session, if it so desires. To do so, it returns an extra response header to the client, Set-Cookie2. 553 (The details follow later.) 554 </p> 555 <p id="rfc.section.3.2.1.p.2">A user agent returns a Cookie request header (see below) to the origin server if it chooses to continue a session. The origin 556 server <em class="bcp14">MAY</em> ignore it or use it to determine the current state of the session. It <em class="bcp14">MAY</em> send back to the client a Set-Cookie2 response header with the same or different information, or it <em class="bcp14">MAY</em> send no Set-Cookie2 header at all. The origin server effectively ends a session by sending the client a Set-Cookie2 header 557 with Max-Age=0. 558 </p> 559 <p id="rfc.section.3.2.1.p.3">Servers <em class="bcp14">MAY</em> return Set-Cookie2 response headers with any response. User agents <em class="bcp14">SHOULD</em> send Cookie request headers, subject to other rules detailed below, with every request. 560 </p> 561 <p id="rfc.section.3.2.1.p.4">An origin server <em class="bcp14">MAY</em> include multiple Set-Cookie2 headers in a response. Note that an intervening gateway could fold multiple such headers into 562 a single header. 563 </p> 564 <div id="rfc.iref.s.1"></div> 565 <div id="rfc.iref.h.1"></div> 566 <h3 id="rfc.section.3.2.2"><a href="#rfc.section.3.2.2">3.2.2</a> Set-Cookie2 Syntax 567 </h3> 568 <p id="rfc.section.3.2.2.p.1">The syntax for the Set-Cookie2 response header is</p> 569 <div id="rfc.figure.u.2"></div><pre class="inline"> 338 </pre><p id="rfc.section.3.1.p.3">Attributes (names) (attr) are case-insensitive. White space is permitted between tokens. Note that while the above syntax description shows value as optional, most attrs require them.</p><p id="rfc.section.3.1.p.4">NOTE: The syntax above allows whitespace between the attribute and the = sign.</p><h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> Origin Server Role</h2><h3 id="rfc.section.3.2.1"><a href="#rfc.section.3.2.1">3.2.1</a> General</h3><p id="rfc.section.3.2.1.p.1">The origin server initiates a session, if it so desires. To do so, it returns an extra response header to the client, Set-Cookie2. (The details follow later.)</p><p id="rfc.section.3.2.1.p.2">A user agent returns a Cookie request header (see below) to the origin server if it chooses to continue a session. The origin server <em class="bcp14">MAY</em> ignore it or use it to determine the current state of the session. It <em class="bcp14">MAY</em> send back to the client a Set-Cookie2 response header with the same or different information, or it <em class="bcp14">MAY</em> send no Set-Cookie2 header at all. The origin server effectively ends a session by sending the client a Set-Cookie2 header with Max-Age=0.</p><p id="rfc.section.3.2.1.p.3">Servers <em class="bcp14">MAY</em> return Set-Cookie2 response headers with any response. User agents <em class="bcp14">SHOULD</em> send Cookie request headers, subject to other rules detailed below, with every request.</p><p id="rfc.section.3.2.1.p.4">An origin server <em class="bcp14">MAY</em> include multiple Set-Cookie2 headers in a response. Note that an intervening gateway could fold multiple such headers into a single header.</p><div id="rfc.iref.s.1"></div><div id="rfc.iref.h.1"></div><h3 id="rfc.section.3.2.2"><a href="#rfc.section.3.2.2">3.2.2</a> Set-Cookie2 Syntax</h3><p id="rfc.section.3.2.2.p.1">The syntax for the Set-Cookie2 response header is</p><div id="rfc.figure.u.2"></div><pre class="inline"> 570 339 set-cookie = "Set-Cookie2:" cookies 571 340 cookies = 1#cookie … … 584 353 portlist = 1#portnum 585 354 portnum = 1*DIGIT 586 </pre><p id="rfc.section.3.2.2.p.3">Informally, the Set-Cookie2 response header comprises the token Set-Cookie2:, followed by a comma-separated list of one or 587 more cookies. Each cookie begins with a NAME=VALUE pair, followed by zero or more semi-colon-separated attribute-value pairs. 588 The syntax for attribute-value pairs was shown earlier. The specific attributes and the semantics of their values follows. 589 The NAME=VALUE attribute-value pair <em class="bcp14">MUST</em> come first in each cookie. The others, if present, can occur in any order. If an attribute appears more than once in a cookie, 590 the client <em class="bcp14">SHALL</em> use only the value associated with the first appearance of the attribute; a client <em class="bcp14">MUST</em> ignore values after the first. 591 </p> 592 <p id="rfc.section.3.2.2.p.4">The NAME of a cookie <em class="bcp14">MAY</em> be the same as one of the attributes in this specification. However, because the cookie's NAME must come first in a Set-Cookie2 593 response header, the NAME and its VALUE cannot be confused with an attribute-value pair. 594 </p> 595 <p id="rfc.section.3.2.2.p.5"> </p> 596 <dl> 597 <dt>NAME=VALUE</dt> 598 <dd> 599 <p> <em class="bcp14">REQUIRED</em>. The name of the state information ("cookie") is NAME, and its value is VALUE. NAMEs that begin with $ are reserved and <em class="bcp14">MUST NOT</em> be used by applications. 600 </p> 601 <p>The VALUE is opaque to the user agent and may be anything the origin server chooses to send, possibly in a server-selected 602 printable ASCII encoding. "Opaque" implies that the content is of interest and relevance only to the origin server. The content 603 may, in fact, be readable by anyone that examines the Set-Cookie2 header. 604 </p> 605 </dd> 606 <dt>Comment=value</dt> 607 <dd> 608 <p> <em class="bcp14">OPTIONAL</em>. Because cookies can be used to derive or store private information about a user, the value of the Comment attribute allows 609 an origin server to document how it intends to use the cookie. The user can inspect the information to decide whether to initiate 610 or continue a session with this cookie. Characters in value <em class="bcp14">MUST</em> be in UTF-8 encoding. <a href="#RFC2279" id="rfc.xref.RFC2279.1"><cite title="UTF-8, a transformation format of ISO 10646">[RFC2279]</cite></a> 611 </p> 612 </dd> 613 <dt>CommentURL="http_URL"</dt> 614 <dd> 615 <p> <em class="bcp14">OPTIONAL</em>. Because cookies can be used to derive or store private information about a user, the CommentURL attribute allows an origin 616 server to document how it intends to use the cookie. The user can inspect the information identified by the URL to decide 617 whether to initiate or continue a session with this cookie. 618 </p> 619 </dd> 620 <dt>Discard</dt> 621 <dd> 622 <p> <em class="bcp14">OPTIONAL</em>. The Discard attribute instructs the user agent to discard the cookie unconditionally when the user agent terminates. 623 </p> 624 </dd> 625 <dt>Domain=value</dt> 626 <dd> 627 <p> <em class="bcp14">OPTIONAL</em>. The value of the Domain attribute specifies the domain for which the cookie is valid. If an explicitly specified value does 628 not start with a dot, the user agent supplies a leading dot. 629 </p> 630 </dd> 631 <dt>Max-Age=value</dt> 632 <dd> 633 <p> <em class="bcp14">OPTIONAL</em>. The value of the Max-Age attribute is delta-seconds, the lifetime of the cookie in seconds, a decimal non-negative integer. 634 To handle cached cookies correctly, a client <em class="bcp14">SHOULD</em> calculate the age of the cookie according to the age calculation rules in the HTTP/1.1 specification <a href="#RFC2616" id="rfc.xref.RFC2616.3"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>. When the age is greater than delta-seconds seconds, the client <em class="bcp14">SHOULD</em> discard the cookie. A value of zero means the cookie <em class="bcp14">SHOULD</em> be discarded immediately. 635 </p> 636 </dd> 637 <dt>Path=value</dt> 638 <dd> 639 <p> <em class="bcp14">OPTIONAL</em>. The value of the Path attribute specifies the subset of URLs on the origin server to which this cookie applies. 640 </p> 641 </dd> 642 <dt>Port[="portlist"]</dt> 643 <dd> 644 <p> <em class="bcp14">OPTIONAL</em>. The Port attribute restricts the port to which a cookie may be returned in a Cookie request header. Note that the syntax 645 REQUIREs quotes around the <em class="bcp14">OPTIONAL</em> portlist even if there is only one portnum in portlist. 646 </p> 647 </dd> 648 <dt>Secure</dt> 649 <dd> 650 <p> <em class="bcp14">OPTIONAL</em>. The Secure attribute (with no value) directs the user agent to use only (unspecified) secure means to contact the origin 651 server whenever it sends back this cookie, to protect the confidentially and authenticity of the information in the cookie. 652 </p> 653 <p>The user agent (possibly with user interaction) <em class="bcp14">MAY</em> determine what level of security it considers appropriate for "secure" cookies. The Secure attribute should be considered 654 security advice from the server to the user agent, indicating that it is in the session's interest to protect the cookie contents. 655 When it sends a "secure" cookie back to a server, the user agent <em class="bcp14">SHOULD</em> use no less than the same level of security as was used when it received the cookie from the server. 656 </p> 657 </dd> 658 <dt>Version=value</dt> 659 <dd> 660 <p> <em class="bcp14">REQUIRED</em>. The value of the Version attribute, a decimal integer, identifies the version of the state management specification to which 661 the cookie conforms. For this specification, Version=1 applies. 662 </p> 663 </dd> 664 </dl> 665 <h3 id="rfc.section.3.2.3"><a href="#rfc.section.3.2.3">3.2.3</a> Controlling Caching 666 </h3> 667 <p id="rfc.section.3.2.3.p.1">An origin server must be cognizant of the effect of possible caching of both the returned resource and the Set-Cookie2 header. 668 Caching "public" documents is desirable. For example, if the origin server wants to use a public document such as a "front 669 door" page as a sentinel to indicate the beginning of a session for which a Set-Cookie2 response header must be generated, 670 the page <em class="bcp14">SHOULD</em> be stored in caches "pre-expired" so that the origin server will see further requests. "Private documents", for example those 671 that contain information strictly private to a session, <em class="bcp14">SHOULD</em> NOT be cached in shared caches. 672 </p> 673 <p id="rfc.section.3.2.3.p.2">If the cookie is intended for use by a single user, the Set-Cookie2 header <em class="bcp14">SHOULD NOT</em> be cached. A Set-Cookie2 header that is intended to be shared by multiple users <em class="bcp14">MAY</em> be cached. 674 </p> 675 <p id="rfc.section.3.2.3.p.3">The origin server <em class="bcp14">SHOULD</em> send the following additional HTTP/1.1 response headers, depending on circumstances: 676 </p> 677 <ul> 678 <li>To suppress caching of the Set-Cookie2 header: 679 <div id="rfc.figure.u.3"></div><pre class="text"> 355 </pre><p id="rfc.section.3.2.2.p.3">Informally, the Set-Cookie2 response header comprises the token Set-Cookie2:, followed by a comma-separated list of one or more cookies. Each cookie begins with a NAME=VALUE pair, followed by zero or more semi-colon-separated attribute-value pairs. The syntax for attribute-value pairs was shown earlier. The specific attributes and the semantics of their values follows. The NAME=VALUE attribute-value pair <em class="bcp14">MUST</em> come first in each cookie. The others, if present, can occur in any order. If an attribute appears more than once in a cookie, the client <em class="bcp14">SHALL</em> use only the value associated with the first appearance of the attribute; a client <em class="bcp14">MUST</em> ignore values after the first.</p><p id="rfc.section.3.2.2.p.4">The NAME of a cookie <em class="bcp14">MAY</em> be the same as one of the attributes in this specification. However, because the cookie's NAME must come first in a Set-Cookie2 response header, the NAME and its VALUE cannot be confused with an attribute-value pair.</p><p id="rfc.section.3.2.2.p.5"> </p><dl><dt>NAME=VALUE</dt><dd><p> <em class="bcp14">REQUIRED</em>. The name of the state information ("cookie") is NAME, and its value is VALUE. NAMEs that begin with $ are reserved and <em class="bcp14">MUST NOT</em> be used by applications.</p><p>The VALUE is opaque to the user agent and may be anything the origin server chooses to send, possibly in a server-selected printable ASCII encoding. "Opaque" implies that the content is of interest and relevance only to the origin server. The content may, in fact, be readable by anyone that examines the Set-Cookie2 header.</p></dd><dt>Comment=value</dt><dd><p> <em class="bcp14">OPTIONAL</em>. Because cookies can be used to derive or store private information about a user, the value of the Comment attribute allows an origin server to document how it intends to use the cookie. The user can inspect the information to decide whether to initiate or continue a session with this cookie. Characters in value <em class="bcp14">MUST</em> be in UTF-8 encoding. <a href="#RFC2279" id="rfc.xref.RFC2279.1"><cite title="UTF-8, a transformation format of ISO 10646">[RFC2279]</cite></a> </p></dd><dt>CommentURL="http_URL"</dt><dd><p> <em class="bcp14">OPTIONAL</em>. Because cookies can be used to derive or store private information about a user, the CommentURL attribute allows an origin server to document how it intends to use the cookie. The user can inspect the information identified by the URL to decide whether to initiate or continue a session with this cookie.</p></dd><dt>Discard</dt><dd><p> <em class="bcp14">OPTIONAL</em>. The Discard attribute instructs the user agent to discard the cookie unconditionally when the user agent terminates.</p></dd><dt>Domain=value</dt><dd><p> <em class="bcp14">OPTIONAL</em>. The value of the Domain attribute specifies the domain for which the cookie is valid. If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.</p></dd><dt>Max-Age=value</dt><dd><p> <em class="bcp14">OPTIONAL</em>. The value of the Max-Age attribute is delta-seconds, the lifetime of the cookie in seconds, a decimal non-negative integer. To handle cached cookies correctly, a client <em class="bcp14">SHOULD</em> calculate the age of the cookie according to the age calculation rules in the HTTP/1.1 specification <a href="#RFC2616" id="rfc.xref.RFC2616.3"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>. When the age is greater than delta-seconds seconds, the client <em class="bcp14">SHOULD</em> discard the cookie. A value of zero means the cookie <em class="bcp14">SHOULD</em> be discarded immediately.</p></dd><dt>Path=value</dt><dd><p> <em class="bcp14">OPTIONAL</em>. The value of the Path attribute specifies the subset of URLs on the origin server to which this cookie applies.</p></dd><dt>Port[="portlist"]</dt><dd><p> <em class="bcp14">OPTIONAL</em>. The Port attribute restricts the port to which a cookie may be returned in a Cookie request header. Note that the syntax REQUIREs quotes around the <em class="bcp14">OPTIONAL</em> portlist even if there is only one portnum in portlist.</p></dd><dt>Secure</dt><dd><p> <em class="bcp14">OPTIONAL</em>. The Secure attribute (with no value) directs the user agent to use only (unspecified) secure means to contact the origin server whenever it sends back this cookie, to protect the confidentially and authenticity of the information in the cookie.</p><p>The user agent (possibly with user interaction) <em class="bcp14">MAY</em> determine what level of security it considers appropriate for "secure" cookies. The Secure attribute should be considered security advice from the server to the user agent, indicating that it is in the session's interest to protect the cookie contents. When it sends a "secure" cookie back to a server, the user agent <em class="bcp14">SHOULD</em> use no less than the same level of security as was used when it received the cookie from the server.</p></dd><dt>Version=value</dt><dd><p> <em class="bcp14">REQUIRED</em>. The value of the Version attribute, a decimal integer, identifies the version of the state management specification to which the cookie conforms. For this specification, Version=1 applies.</p></dd></dl><h3 id="rfc.section.3.2.3"><a href="#rfc.section.3.2.3">3.2.3</a> Controlling Caching</h3><p id="rfc.section.3.2.3.p.1">An origin server must be cognizant of the effect of possible caching of both the returned resource and the Set-Cookie2 header. Caching "public" documents is desirable. For example, if the origin server wants to use a public document such as a "front door" page as a sentinel to indicate the beginning of a session for which a Set-Cookie2 response header must be generated, the page <em class="bcp14">SHOULD</em> be stored in caches "pre-expired" so that the origin server will see further requests. "Private documents", for example those that contain information strictly private to a session, <em class="bcp14">SHOULD</em> NOT be cached in shared caches.</p><p id="rfc.section.3.2.3.p.2">If the cookie is intended for use by a single user, the Set-Cookie2 header <em class="bcp14">SHOULD NOT</em> be cached. A Set-Cookie2 header that is intended to be shared by multiple users <em class="bcp14">MAY</em> be cached.</p><p id="rfc.section.3.2.3.p.3">The origin server <em class="bcp14">SHOULD</em> send the following additional HTTP/1.1 response headers, depending on circumstances: </p><ul><li>To suppress caching of the Set-Cookie2 header: <div id="rfc.figure.u.3"></div><pre class="text"> 680 356 Cache-control: no-cache="set-cookie2" 681 </pre> </li> 682 </ul> 683 <p id="rfc.section.3.2.3.p.4">and one of the following: </p> 684 <ul> 685 <li>To suppress caching of a private document in shared caches: 686 <div id="rfc.figure.u.4"></div><pre class="text"> 357 </pre> </li></ul><p id="rfc.section.3.2.3.p.4">and one of the following: </p><ul><li>To suppress caching of a private document in shared caches: <div id="rfc.figure.u.4"></div><pre class="text"> 687 358 Cache-control: private 688 </pre> </li> 689 <li>To allow caching of a document and require that it be validated before returning it to the client: 690 <div id="rfc.figure.u.5"></div><pre class="text"> 359 </pre> </li><li>To allow caching of a document and require that it be validated before returning it to the client: <div id="rfc.figure.u.5"></div><pre class="text"> 691 360 Cache-Control: must-revalidate, max-age=0 692 </pre> </li> 693 <li>To allow caching of a document, but to require that proxy caches (not user agent caches) validate it before returning it to 694 the client: 695 <div id="rfc.figure.u.6"></div><pre class="text"> 361 </pre> </li><li>To allow caching of a document, but to require that proxy caches (not user agent caches) validate it before returning it to the client: <div id="rfc.figure.u.6"></div><pre class="text"> 696 362 Cache-Control: proxy-revalidate, max-age=0 697 </pre> </li> 698 <li>To allow caching of a document and request that it be validated before returning it to the client (by "pre-expiring" it): 699 <div id="rfc.figure.u.7"></div><pre class="text"> 363 </pre> </li><li>To allow caching of a document and request that it be validated before returning it to the client (by "pre-expiring" it): <div id="rfc.figure.u.7"></div><pre class="text"> 700 364 Cache-control: max-age=0 701 </pre> Not all caches will revalidate the document in every case.</li> 702 </ul> 703 <p id="rfc.section.3.2.3.p.5">HTTP/1.1 servers <em class="bcp14">MUST</em> send Expires: old-date (where old-date is a date long in the past) on responses containing Set-Cookie2 response headers unless 704 they know for certain (by out of band means) that there are no HTTP/1.0 proxies in the response chain. HTTP/1.1 servers <em class="bcp14">MAY</em> send other Cache-Control directives that permit caching by HTTP/1.1 proxies in addition to the Expires: old-date directive; 705 the Cache-Control directive will override the Expires: old-date for HTTP/1.1 proxies. 706 </p> 707 <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> User Agent Role 708 </h2> 709 <h3 id="rfc.section.3.3.1"><a href="#rfc.section.3.3.1">3.3.1</a> Interpreting Set-Cookie2 710 </h3> 711 <p id="rfc.section.3.3.1.p.1">The user agent keeps separate track of state information that arrives via Set-Cookie2 response headers from each origin server 712 (as distinguished by name or IP address and port). The user agent <em class="bcp14">MUST</em> ignore attribute-value pairs whose attribute it does not recognize. The user agent applies these defaults for optional attributes 713 that are missing: 714 </p> 715 <p id="rfc.section.3.3.1.p.2"> </p> 716 <dl> 717 <dt>Discard</dt> 718 <dd>The default behavior is dictated by the presence or absence of a Max-Age attribute.</dd> 719 <dt>Domain</dt> 720 <dd>Defaults to the effective request-host. (Note that because there is no dot at the beginning of effective request-host, the 721 default Domain can only domain-match itself.) 722 </dd> 723 <dt>Max-Age</dt> 724 <dd>The default behavior is to discard the cookie when the user agent exits.</dd> 725 <dt>Path</dt> 726 <dd>Defaults to the path of the request URL that generated the Set-Cookie2 response, up to and including the right-most /.</dd> 727 <dt>Port</dt> 728 <dd>The default behavior is that a cookie <em class="bcp14">MAY</em> be returned to any request-port. 729 </dd> 730 <dt>Secure</dt> 731 <dd>If absent, the user agent <em class="bcp14">MAY</em> send the cookie over an insecure channel. 732 </dd> 733 </dl> 734 <h3 id="rfc.section.3.3.2"><a href="#rfc.section.3.3.2">3.3.2</a> Rejecting Cookies 735 </h3> 736 <p id="rfc.section.3.3.2.p.1">To prevent possible security or privacy violations, a user agent rejects a cookie according to rules below. The goal of the 737 rules is to try to limit the set of servers for which a cookie is valid, based on the values of the Path, Domain, and Port 738 attributes and the request-URI, request-host and request-port. 739 </p> 740 <p id="rfc.section.3.3.2.p.2">A user agent rejects (<em class="bcp14">SHALL NOT</em> store its information) if the Version attribute is missing. Moreover, a user agent rejects (<em class="bcp14">SHALL NOT</em> store its information) if any of the following is true of the attributes explicitly present in the Set-Cookie2 response header: 741 </p> 742 <ul> 743 <li>The value for the Path attribute is not a prefix of the request-URI.</li> 744 <li>The value for the Domain attribute contains no embedded dots, and the value is not .local.</li> 745 <li>The effective host name that derives from the request-host does not domain-match the Domain attribute.</li> 746 <li>The request-host is a HDN (not IP address) and has the form HD, where D is the value of the Domain attribute, and H is a string 747 that contains one or more dots. 748 </li> 749 <li>The Port attribute has a "port-list", and the request-port was not in the list.</li> 750 </ul> 751 <p id="rfc.section.3.3.2.p.3">Examples: </p> 752 <ul> 753 <li>A Set-Cookie2 from request-host y.x.foo.com for Domain=.foo.com would be rejected, because H is y.x and contains a dot.</li> 754 <li>A Set-Cookie2 from request-host x.foo.com for Domain=.foo.com would be accepted.</li> 755 <li>A Set-Cookie2 with Domain=.com or Domain=.com., will always be rejected, because there is no embedded dot.</li> 756 <li>A Set-Cookie2 with Domain=ajax.com will be accepted, and the value for Domain will be taken to be .ajax.com, because a dot 757 gets prepended to the value. 758 </li> 759 <li>A Set-Cookie2 with Port="80,8000" will be accepted if the request was made to port 80 or 8000 and will be rejected otherwise.</li> 760 <li>A Set-Cookie2 from request-host example for Domain=.local will be accepted, because the effective host name for the request- 761 host is example.local, and example.local domain-matches .local. 762 </li> 763 </ul> 764 <h3 id="rfc.section.3.3.3"><a href="#rfc.section.3.3.3">3.3.3</a> Cookie Management 765 </h3> 766 <p id="rfc.section.3.3.3.p.1">If a user agent receives a Set-Cookie2 response header whose NAME is the same as that of a cookie it has previously stored, 767 the new cookie supersedes the old when: the old and new Domain attribute values compare equal, using a case-insensitive string-compare; 768 and, the old and new Path attribute values string-compare equal (case-sensitive). However, if the Set-Cookie2 has a value 769 for Max-Age of zero, the (old and new) cookie is discarded. Otherwise a cookie persists (resources permitting) until whichever 770 happens first, then gets discarded: its Max-Age lifetime is exceeded; or, if the Discard attribute is set, the user agent 771 terminates the session. 772 </p> 773 <p id="rfc.section.3.3.3.p.2">Because user agents have finite space in which to store cookies, they <em class="bcp14">MAY</em> also discard older cookies to make space for newer ones, using, for example, a least-recently-used algorithm, along with constraints 774 on the maximum number of cookies that each origin server may set. 775 </p> 776 <p id="rfc.section.3.3.3.p.3">If a Set-Cookie2 response header includes a Comment attribute, the user agent <em class="bcp14">SHOULD</em> store that information in a human-readable form with the cookie and <em class="bcp14">SHOULD</em> display the comment text as part of a cookie inspection user interface. 777 </p> 778 <p id="rfc.section.3.3.3.p.4">If a Set-Cookie2 response header includes a CommentURL attribute, the user agent <em class="bcp14">SHOULD</em> store that information in a human-readable form with the cookie, or, preferably, <em class="bcp14">SHOULD</em> allow the user to follow the http_URL link as part of a cookie inspection user interface. 779 </p> 780 <p id="rfc.section.3.3.3.p.5">The cookie inspection user interface may include a facility whereby a user can decide, at the time the user agent receives 781 the Set-Cookie2 response header, whether or not to accept the cookie. A potentially confusing situation could arise if the 782 following sequence occurs: 783 </p> 784 <ul> 785 <li>the user agent receives a cookie that contains a CommentURL attribute;</li> 786 <li>the user agent's cookie inspection interface is configured so that it presents a dialog to the user before the user agent 787 accepts the cookie; 788 </li> 789 <li>the dialog allows the user to follow the CommentURL link when the user agent receives the cookie; and,</li> 790 <li>when the user follows the CommentURL link, the origin server (or another server, via other links in the returned content) 791 returns another cookie. 792 </li> 793 </ul> 794 <p id="rfc.section.3.3.3.p.6">The user agent <em class="bcp14">SHOULD NOT</em> send any cookies in this context. The user agent <em class="bcp14">MAY</em> discard any cookie it receives in this context that the user has not, through some user agent mechanism, deemed acceptable. 795 </p> 796 <p id="rfc.section.3.3.3.p.7">User agents <em class="bcp14">SHOULD</em> allow the user to control cookie destruction, but they <em class="bcp14">MUST NOT</em> extend the cookie's lifetime beyond that controlled by the Discard and Max-Age attributes. An infrequently-used cookie may 797 function as a "preferences file" for network applications, and a user may wish to keep it even if it is the least-recently-used 798 cookie. One possible implementation would be an interface that allows the permanent storage of a cookie through a checkbox 799 (or, conversely, its immediate destruction). 800 </p> 801 <p id="rfc.section.3.3.3.p.8">Privacy considerations dictate that the user have considerable control over cookie management. The PRIVACY section contains 802 more information. 803 </p> 804 <div id="rfc.iref.c.1"></div> 805 <div id="rfc.iref.h.2"></div> 806 <h3 id="rfc.section.3.3.4"><a href="#rfc.section.3.3.4">3.3.4</a> Sending Cookies to the Origin Server 807 </h3> 808 <p id="rfc.section.3.3.4.p.1">When it sends a request to an origin server, the user agent includes a Cookie request header if it has stored cookies that 809 are applicable to the request, based on 810 </p> 811 <ul> 812 <li>the request-host and request-port;</li> 813 <li>the request-URI;</li> 814 <li>the cookie's age.</li> 815 </ul> 816 <div id="rfc.figure.u.8"></div> 817 <p>The syntax for the header is:</p><pre class="inline"> 365 </pre> Not all caches will revalidate the document in every case.</li></ul><p id="rfc.section.3.2.3.p.5">HTTP/1.1 servers <em class="bcp14">MUST</em> send Expires: old-date (where old-date is a date long in the past) on responses containing Set-Cookie2 response headers unless they know for certain (by out of band means) that there are no HTTP/1.0 proxies in the response chain. HTTP/1.1 servers <em class="bcp14">MAY</em> send other Cache-Control directives that permit caching by HTTP/1.1 proxies in addition to the Expires: old-date directive; the Cache-Control directive will override the Expires: old-date for HTTP/1.1 proxies.</p><h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> User Agent Role</h2><h3 id="rfc.section.3.3.1"><a href="#rfc.section.3.3.1">3.3.1</a> Interpreting Set-Cookie2</h3><p id="rfc.section.3.3.1.p.1">The user agent keeps separate track of state information that arrives via Set-Cookie2 response headers from each origin server (as distinguished by name or IP address and port). The user agent <em class="bcp14">MUST</em> ignore attribute-value pairs whose attribute it does not recognize. The user agent applies these defaults for optional attributes that are missing:</p><p id="rfc.section.3.3.1.p.2"> </p><dl><dt>Discard</dt><dd>The default behavior is dictated by the presence or absence of a Max-Age attribute.</dd><dt>Domain</dt><dd>Defaults to the effective request-host. (Note that because there is no dot at the beginning of effective request-host, the default Domain can only domain-match itself.)</dd><dt>Max-Age</dt><dd>The default behavior is to discard the cookie when the user agent exits.</dd><dt>Path</dt><dd>Defaults to the path of the request URL that generated the Set-Cookie2 response, up to and including the right-most /.</dd><dt>Port</dt><dd>The default behavior is that a cookie <em class="bcp14">MAY</em> be returned to any request-port.</dd><dt>Secure</dt><dd>If absent, the user agent <em class="bcp14">MAY</em> send the cookie over an insecure channel.</dd></dl><h3 id="rfc.section.3.3.2"><a href="#rfc.section.3.3.2">3.3.2</a> Rejecting Cookies</h3><p id="rfc.section.3.3.2.p.1">To prevent possible security or privacy violations, a user agent rejects a cookie according to rules below. The goal of the rules is to try to limit the set of servers for which a cookie is valid, based on the values of the Path, Domain, and Port attributes and the request-URI, request-host and request-port.</p><p id="rfc.section.3.3.2.p.2">A user agent rejects (<em class="bcp14">SHALL NOT</em> store its information) if the Version attribute is missing. Moreover, a user agent rejects (<em class="bcp14">SHALL NOT</em> store its information) if any of the following is true of the attributes explicitly present in the Set-Cookie2 response header: </p><ul><li>The value for the Path attribute is not a prefix of the request-URI.</li><li>The value for the Domain attribute contains no embedded dots, and the value is not .local.</li><li>The effective host name that derives from the request-host does not domain-match the Domain attribute.</li><li>The request-host is a HDN (not IP address) and has the form HD, where D is the value of the Domain attribute, and H is a string that contains one or more dots.</li><li>The Port attribute has a "port-list", and the request-port was not in the list.</li></ul><p id="rfc.section.3.3.2.p.3">Examples: </p><ul><li>A Set-Cookie2 from request-host y.x.foo.com for Domain=.foo.com would be rejected, because H is y.x and contains a dot.</li><li>A Set-Cookie2 from request-host x.foo.com for Domain=.foo.com would be accepted.</li><li>A Set-Cookie2 with Domain=.com or Domain=.com., will always be rejected, because there is no embedded dot.</li><li>A Set-Cookie2 with Domain=ajax.com will be accepted, and the value for Domain will be taken to be .ajax.com, because a dot gets prepended to the value.</li><li>A Set-Cookie2 with Port="80,8000" will be accepted if the request was made to port 80 or 8000 and will be rejected otherwise.</li><li>A Set-Cookie2 from request-host example for Domain=.local will be accepted, because the effective host name for the request- host is example.local, and example.local domain-matches .local.</li></ul><h3 id="rfc.section.3.3.3"><a href="#rfc.section.3.3.3">3.3.3</a> Cookie Management</h3><p id="rfc.section.3.3.3.p.1">If a user agent receives a Set-Cookie2 response header whose NAME is the same as that of a cookie it has previously stored, the new cookie supersedes the old when: the old and new Domain attribute values compare equal, using a case-insensitive string-compare; and, the old and new Path attribute values string-compare equal (case-sensitive). However, if the Set-Cookie2 has a value for Max-Age of zero, the (old and new) cookie is discarded. Otherwise a cookie persists (resources permitting) until whichever happens first, then gets discarded: its Max-Age lifetime is exceeded; or, if the Discard attribute is set, the user agent terminates the session.</p><p id="rfc.section.3.3.3.p.2">Because user agents have finite space in which to store cookies, they <em class="bcp14">MAY</em> also discard older cookies to make space for newer ones, using, for example, a least-recently-used algorithm, along with constraints on the maximum number of cookies that each origin server may set.</p><p id="rfc.section.3.3.3.p.3">If a Set-Cookie2 response header includes a Comment attribute, the user agent <em class="bcp14">SHOULD</em> store that information in a human-readable form with the cookie and <em class="bcp14">SHOULD</em> display the comment text as part of a cookie inspection user interface.</p><p id="rfc.section.3.3.3.p.4">If a Set-Cookie2 response header includes a CommentURL attribute, the user agent <em class="bcp14">SHOULD</em> store that information in a human-readable form with the cookie, or, preferably, <em class="bcp14">SHOULD</em> allow the user to follow the http_URL link as part of a cookie inspection user interface.</p><p id="rfc.section.3.3.3.p.5">The cookie inspection user interface may include a facility whereby a user can decide, at the time the user agent receives the Set-Cookie2 response header, whether or not to accept the cookie. A potentially confusing situation could arise if the following sequence occurs: </p><ul><li>the user agent receives a cookie that contains a CommentURL attribute;</li><li>the user agent's cookie inspection interface is configured so that it presents a dialog to the user before the user agent accepts the cookie;</li><li>the dialog allows the user to follow the CommentURL link when the user agent receives the cookie; and,</li><li>when the user follows the CommentURL link, the origin server (or another server, via other links in the returned content) returns another cookie.</li></ul><p id="rfc.section.3.3.3.p.6">The user agent <em class="bcp14">SHOULD NOT</em> send any cookies in this context. The user agent <em class="bcp14">MAY</em> discard any cookie it receives in this context that the user has not, through some user agent mechanism, deemed acceptable.</p><p id="rfc.section.3.3.3.p.7">User agents <em class="bcp14">SHOULD</em> allow the user to control cookie destruction, but they <em class="bcp14">MUST NOT</em> extend the cookie's lifetime beyond that controlled by the Discard and Max-Age attributes. An infrequently-used cookie may function as a "preferences file" for network applications, and a user may wish to keep it even if it is the least-recently-used cookie. One possible implementation would be an interface that allows the permanent storage of a cookie through a checkbox (or, conversely, its immediate destruction).</p><p id="rfc.section.3.3.3.p.8">Privacy considerations dictate that the user have considerable control over cookie management. The PRIVACY section contains more information.</p><div id="rfc.iref.c.1"></div><div id="rfc.iref.h.2"></div><h3 id="rfc.section.3.3.4"><a href="#rfc.section.3.3.4">3.3.4</a> Sending Cookies to the Origin Server</h3><p id="rfc.section.3.3.4.p.1">When it sends a request to an origin server, the user agent includes a Cookie request header if it has stored cookies that are applicable to the request, based on </p><ul><li>the request-host and request-port;</li><li>the request-URI;</li><li>the cookie's age.</li></ul><div id="rfc.figure.u.8"></div><p>The syntax for the header is:</p><pre class="inline"> 818 366 cookie = "Cookie:" cookie-version 1*((";" | ",") cookie-value) 819 367 cookie-value = NAME "=" VALUE [";" path] [";" domain] [";" port] … … 824 372 domain = "$Domain" "=" value 825 373 port = "$Port" [ "=" <"> value <"> ] 826 </pre><p id="rfc.section.3.3.4.p.3">The value of the cookie-version attribute <em class="bcp14">MUST</em> be the value from the Version attribute of the corresponding Set-Cookie2 response header. Otherwise the value for cookie-version 827 is 0. The value for the path attribute <em class="bcp14">MUST</em> be the value from the Path attribute, if one was present, of the corresponding Set-Cookie2 response header. Otherwise the 828 attribute <em class="bcp14">SHOULD</em> be omitted from the Cookie request header. The value for the domain attribute <em class="bcp14">MUST</em> be the value from the Domain attribute, if one was present, of the corresponding Set-Cookie2 response header. Otherwise the 829 attribute <em class="bcp14">SHOULD</em> be omitted from the Cookie request header. 830 </p> 831 <p id="rfc.section.3.3.4.p.4">The port attribute of the Cookie request header <em class="bcp14">MUST</em> mirror the Port attribute, if one was present, in the corresponding Set-Cookie2 response header. That is, the port attribute <em class="bcp14">MUST</em> be present if the Port attribute was present in the Set-Cookie2 header, and it <em class="bcp14">MUST</em> have the same value, if any. Otherwise, if the Port attribute was absent from the Set-Cookie2 header, the attribute likewise <em class="bcp14">MUST</em> be omitted from the Cookie request header. 832 </p> 833 <p id="rfc.section.3.3.4.p.5">Note that there is neither a Comment nor a CommentURL attribute in the Cookie request header corresponding to the ones in 834 the Set-Cookie2 response header. The user agent does not return the comment information to the origin server. 835 </p> 836 <p id="rfc.section.3.3.4.p.6">The user agent applies the following rules to choose applicable cookie-values to send in Cookie request headers from among 837 all the cookies it has received. 838 </p> 839 <dl> 840 <dt>Domain Selection</dt> 841 <dd>The origin server's effective host name <em class="bcp14">MUST</em> domain-match the Domain attribute of the cookie. 842 </dd> 843 <dt>Port Selection</dt> 844 <dd>There are three possible behaviors, depending on the Port attribute in the Set-Cookie2 response header: 845 <ol> 846 <li>By default (no Port attribute), the cookie <em class="bcp14">MAY</em> be sent to any port. 847 </li> 848 <li>If the attribute is present but has no value (e.g., Port), the cookie <em class="bcp14">MUST</em> only be sent to the request-port it was received from. 849 </li> 850 <li>If the attribute has a port-list, the cookie <em class="bcp14">MUST</em> only be returned if the new request-port is one of those listed in port-list. 851 </li> 852 </ol> 853 </dd> 854 <dt>Path Selection</dt> 855 <dd>The request-URI <em class="bcp14">MUST</em> path-match the Path attribute of the cookie. 856 </dd> 857 <dt>Max-Age Selection</dt> 858 <dd>Cookies that have expired should have been discarded and thus are not forwarded to an origin server.</dd> 859 </dl> 860 <p id="rfc.section.3.3.4.p.7">If multiple cookies satisfy the criteria above, they are ordered in the Cookie header such that those with more specific Path 861 attributes precede those with less specific. Ordering with respect to other attributes (e.g., Domain) is unspecified. 862 </p> 863 <p id="rfc.section.3.3.4.p.8">Note: For backward compatibility, the separator in the Cookie header is semi-colon (;) everywhere. A server <em class="bcp14">SHOULD</em> also accept comma (,) as the separator between cookie-values for future compatibility. 864 </p> 865 <div id="rfc.iref.c.2"></div> 866 <div id="rfc.iref.h.3"></div> 867 <h3 id="rfc.section.3.3.5"><a href="#rfc.section.3.3.5">3.3.5</a> Identifying What Version is Understood: Cookie2 868 </h3> 869 <p id="rfc.section.3.3.5.p.1">The Cookie2 request header facilitates interoperation between clients and servers that understand different versions of the 870 cookie specification. When the client sends one or more cookies to an origin server, if at least one of those cookies contains 871 a $Version attribute whose value is different from the version that the client understands, then the client <em class="bcp14">MUST</em> also send a Cookie2 request header, the syntax for which is 872 </p> 873 <div id="rfc.figure.u.9"></div><pre class="inline"> 374 </pre><p id="rfc.section.3.3.4.p.3">The value of the cookie-version attribute <em class="bcp14">MUST</em> be the value from the Version attribute of the corresponding Set-Cookie2 response header. Otherwise the value for cookie-version is 0. The value for the path attribute <em class="bcp14">MUST</em> be the value from the Path attribute, if one was present, of the corresponding Set-Cookie2 response header. Otherwise the attribute <em class="bcp14">SHOULD</em> be omitted from the Cookie request header. The value for the domain attribute <em class="bcp14">MUST</em> be the value from the Domain attribute, if one was present, of the corresponding Set-Cookie2 response header. Otherwise the attribute <em class="bcp14">SHOULD</em> be omitted from the Cookie request header.</p><p id="rfc.section.3.3.4.p.4">The port attribute of the Cookie request header <em class="bcp14">MUST</em> mirror the Port attribute, if one was present, in the corresponding Set-Cookie2 response header. That is, the port attribute <em class="bcp14">MUST</em> be present if the Port attribute was present in the Set-Cookie2 header, and it <em class="bcp14">MUST</em> have the same value, if any. Otherwise, if the Port attribute was absent from the Set-Cookie2 header, the attribute likewise <em class="bcp14">MUST</em> be omitted from the Cookie request header.</p><p id="rfc.section.3.3.4.p.5">Note that there is neither a Comment nor a CommentURL attribute in the Cookie request header corresponding to the ones in the Set-Cookie2 response header. The user agent does not return the comment information to the origin server.</p><p id="rfc.section.3.3.4.p.6">The user agent applies the following rules to choose applicable cookie-values to send in Cookie request headers from among all the cookies it has received. </p><dl><dt>Domain Selection</dt><dd>The origin server's effective host name <em class="bcp14">MUST</em> domain-match the Domain attribute of the cookie.</dd><dt>Port Selection</dt><dd>There are three possible behaviors, depending on the Port attribute in the Set-Cookie2 response header: <ol><li>By default (no Port attribute), the cookie <em class="bcp14">MAY</em> be sent to any port.</li><li>If the attribute is present but has no value (e.g., Port), the cookie <em class="bcp14">MUST</em> only be sent to the request-port it was received from.</li><li>If the attribute has a port-list, the cookie <em class="bcp14">MUST</em> only be returned if the new request-port is one of those listed in port-list.</li></ol> </dd><dt>Path Selection</dt><dd>The request-URI <em class="bcp14">MUST</em> path-match the Path attribute of the cookie.</dd><dt>Max-Age Selection</dt><dd>Cookies that have expired should have been discarded and thus are not forwarded to an origin server.</dd></dl><p id="rfc.section.3.3.4.p.7">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.</p><p id="rfc.section.3.3.4.p.8">Note: For backward compatibility, the separator in the Cookie header is semi-colon (;) everywhere. A server <em class="bcp14">SHOULD</em> also accept comma (,) as the separator between cookie-values for future compatibility.</p><div id="rfc.iref.c.2"></div><div id="rfc.iref.h.3"></div><h3 id="rfc.section.3.3.5"><a href="#rfc.section.3.3.5">3.3.5</a> Identifying What Version is Understood: Cookie2</h3><p id="rfc.section.3.3.5.p.1">The Cookie2 request header facilitates interoperation between clients and servers that understand different versions of the cookie specification. When the client sends one or more cookies to an origin server, if at least one of those cookies contains a $Version attribute whose value is different from the version that the client understands, then the client <em class="bcp14">MUST</em> also send a Cookie2 request header, the syntax for which is</p><div id="rfc.figure.u.9"></div><pre class="inline"> 874 375 cookie2 = "Cookie2:" cookie-version 875 </pre><p id="rfc.section.3.3.5.p.3">Here the value for cookie-version is the highest version of cookie specification (currently 1) that the client understands. 876 The client needs to send at most one such request header per request. 877 </p> 878 <h3 id="rfc.section.3.3.6"><a href="#rfc.section.3.3.6">3.3.6</a> Sending Cookies in Unverifiable Transactions 879 </h3> 880 <p id="rfc.section.3.3.6.p.1">Users <em class="bcp14">MUST</em> have control over sessions in order to ensure privacy. (See PRIVACY section below.) To simplify implementation and to prevent 881 an additional layer of complexity where adequate safeguards exist, however, this document distinguishes between transactions 882 that are verifiable and those that are unverifiable. A transaction is verifiable if the user, or a user-designated agent, 883 has the option to review the request-URI prior to its use in the transaction. A transaction is unverifiable if the user does 884 not have that option. Unverifiable transactions typically arise when a user agent automatically requests inlined or embedded 885 entities or when it resolves redirection (3xx) responses from an origin server. Typically the origin transaction, the transaction 886 that the user initiates, is verifiable, and that transaction may directly or indirectly induce the user agent to make unverifiable 887 transactions. 888 </p> 889 <p id="rfc.section.3.3.6.p.2">An unverifiable transaction is to a third-party host if its request-host U does not domain-match the reach R of the request-host 890 O in the origin transaction. 891 </p> 892 <p id="rfc.section.3.3.6.p.3">When it makes an unverifiable transaction, a user agent <em class="bcp14">MUST</em> disable all cookie processing (i.e., <em class="bcp14">MUST NOT</em> send cookies, and <em class="bcp14">MUST NOT</em> accept any received cookies) if the transaction is to a third-party host. 893 </p> 894 <p id="rfc.section.3.3.6.p.4">This restriction prevents a malicious service author from using unverifiable transactions to induce a user agent to start 895 or continue a session with a server in a different domain. The starting or continuation of such sessions could be contrary 896 to the privacy expectations of the user, and could also be a security problem. 897 </p> 898 <p id="rfc.section.3.3.6.p.5">User agents <em class="bcp14">MAY</em> offer configurable options that allow the user agent, or any autonomous programs that the user agent executes, to ignore the 899 above rule, so long as these override options default to "off". 900 </p> 901 <p id="rfc.section.3.3.6.p.6">(N.B. Mechanisms may be proposed that will automate overriding the third-party restrictions under controlled conditions.)</p> 902 <p id="rfc.section.3.3.6.p.7">Many current user agents already provide a review option that would render many links verifiable. For instance, some user 903 agents display the URL that would be referenced for a particular link when the mouse pointer is placed over that link. The 904 user can therefore determine whether to visit that site before causing the browser to do so. (Though not implemented on current 905 user agents, a similar technique could be used for a button used to submit a form -- the user agent could display the action 906 to be taken if the user were to select that button.) However, even this would not make all links verifiable; for example, 907 links to automatically loaded images would not normally be subject to "mouse pointer" verification. 908 </p> 909 <p id="rfc.section.3.3.6.p.8">Many user agents also provide the option for a user to view the HTML source of a document, or to save the source to an external 910 file where it can be viewed by another application. While such an option does provide a crude review mechanism, some users 911 might not consider it acceptable for this purpose. 912 </p> 913 <h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a> How an Origin Server Interprets the Cookie Header 914 </h2> 915 <p id="rfc.section.3.4.p.1">A user agent returns much of the information in the Set-Cookie2 header to the origin server when the request-URI path-matches 916 the Path attribute of the cookie. When it receives a Cookie header, the origin server <em class="bcp14">SHOULD</em> treat cookies with NAMEs whose prefix is $ specially, as an attribute for the cookie. 917 </p> 918 <h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a> Caching Proxy Role 919 </h2> 920 <p id="rfc.section.3.5.p.1">One reason for separating state information from both a URL and document content is to facilitate the scaling that caching 921 permits. To support cookies, a caching proxy <em class="bcp14">MUST</em> obey these rules already in the HTTP specification: 922 </p> 923 <ul> 924 <li>Honor requests from the cache, if possible, based on cache validity rules.</li> 925 <li>Pass along a Cookie request header in any request that the proxy must make of another server.</li> 926 <li>Return the response to the client. Include any Set-Cookie2 response header.</li> 927 <li>Cache the received response subject to the control of the usual headers, such as Expires, 928 <div id="rfc.figure.u.10"></div><pre class="text"> 376 </pre><p id="rfc.section.3.3.5.p.3">Here the value for cookie-version is the highest version of cookie specification (currently 1) that the client understands. The client needs to send at most one such request header per request.</p><h3 id="rfc.section.3.3.6"><a href="#rfc.section.3.3.6">3.3.6</a> Sending Cookies in Unverifiable Transactions</h3><p id="rfc.section.3.3.6.p.1">Users <em class="bcp14">MUST</em> have control over sessions in order to ensure privacy. (See PRIVACY section below.) To simplify implementation and to prevent an additional layer of complexity where adequate safeguards exist, however, this document distinguishes between transactions that are verifiable and those that are unverifiable. A transaction is verifiable if the user, or a user-designated agent, has the option to review the request-URI prior to its use in the transaction. A transaction is unverifiable if the user does not have that option. Unverifiable transactions typically arise when a user agent automatically requests inlined or embedded entities or when it resolves redirection (3xx) responses from an origin server. Typically the origin transaction, the transaction that the user initiates, is verifiable, and that transaction may directly or indirectly induce the user agent to make unverifiable transactions.</p><p id="rfc.section.3.3.6.p.2">An unverifiable transaction is to a third-party host if its request-host U does not domain-match the reach R of the request-host O in the origin transaction.</p><p id="rfc.section.3.3.6.p.3">When it makes an unverifiable transaction, a user agent <em class="bcp14">MUST</em> disable all cookie processing (i.e., <em class="bcp14">MUST NOT</em> send cookies, and <em class="bcp14">MUST NOT</em> accept any received cookies) if the transaction is to a third-party host.</p><p id="rfc.section.3.3.6.p.4">This restriction prevents a malicious service author from using unverifiable transactions to induce a user agent to start or continue a session with a server in a different domain. The starting or continuation of such sessions could be contrary to the privacy expectations of the user, and could also be a security problem.</p><p id="rfc.section.3.3.6.p.5">User agents <em class="bcp14">MAY</em> offer configurable options that allow the user agent, or any autonomous programs that the user agent executes, to ignore the above rule, so long as these override options default to "off".</p><p id="rfc.section.3.3.6.p.6">(N.B. Mechanisms may be proposed that will automate overriding the third-party restrictions under controlled conditions.)</p><p id="rfc.section.3.3.6.p.7">Many current user agents already provide a review option that would render many links verifiable. For instance, some user agents display the URL that would be referenced for a particular link when the mouse pointer is placed over that link. The user can therefore determine whether to visit that site before causing the browser to do so. (Though not implemented on current user agents, a similar technique could be used for a button used to submit a form -- the user agent could display the action to be taken if the user were to select that button.) However, even this would not make all links verifiable; for example, links to automatically loaded images would not normally be subject to "mouse pointer" verification.</p><p id="rfc.section.3.3.6.p.8">Many user agents also provide the option for a user to view the HTML source of a document, or to save the source to an external file where it can be viewed by another application. While such an option does provide a crude review mechanism, some users might not consider it acceptable for this purpose.</p><h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a> How an Origin Server Interprets the Cookie Header</h2><p id="rfc.section.3.4.p.1">A user agent returns much of the information in the Set-Cookie2 header to the origin server when the request-URI path-matches the Path attribute of the cookie. When it receives a Cookie header, the origin server <em class="bcp14">SHOULD</em> treat cookies with NAMEs whose prefix is $ specially, as an attribute for the cookie.</p><h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a> Caching Proxy Role</h2><p id="rfc.section.3.5.p.1">One reason for separating state information from both a URL and document content is to facilitate the scaling that caching permits. To support cookies, a caching proxy <em class="bcp14">MUST</em> obey these rules already in the HTTP specification: </p><ul><li>Honor requests from the cache, if possible, based on cache validity rules.</li><li>Pass along a Cookie request header in any request that the proxy must make of another server.</li><li>Return the response to the client. Include any Set-Cookie2 response header.</li><li>Cache the received response subject to the control of the usual headers, such as Expires, <div id="rfc.figure.u.10"></div><pre class="text"> 929 377 Cache-control: no-cache 930 378 </pre> and <div id="rfc.figure.u.11"></div><pre class="text"> 931 379 Cache-control: private 932 </pre> </li> 933 <li>Cache the Set-Cookie2 subject to the control of the usual header, 934 <div id="rfc.figure.u.12"></div><pre class="text"> 380 </pre> </li><li>Cache the Set-Cookie2 subject to the control of the usual header, <div id="rfc.figure.u.12"></div><pre class="text"> 935 381 Cache-control: no-cache="set-cookie2" 936 </pre> (The Set-Cookie2 header should usually not be cached.)</li> 937 </ul> 938 <p id="rfc.section.3.5.p.2">Proxies <em class="bcp14">MUST NOT</em> introduce Set-Cookie2 (Cookie) headers of their own in proxy responses (requests). 939 </p> 940 <hr class="noprint"> 941 <h1 id="rfc.section.4" class="np"><a href="#rfc.section.4">4.</a> EXAMPLES 942 </h1> 943 <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> Example 1 944 </h2> 945 <p id="rfc.section.4.1.p.1">Most detail of request and response headers has been omitted. Assume the user agent has no stored cookies.</p> 946 <p id="rfc.section.4.1.p.2">1. User Agent -> Server</p> 947 <div id="rfc.figure.u.13"></div><pre class="text2"> 382 </pre> (The Set-Cookie2 header should usually not be cached.)</li></ul><p id="rfc.section.3.5.p.2">Proxies <em class="bcp14">MUST NOT</em> introduce Set-Cookie2 (Cookie) headers of their own in proxy responses (requests).</p><hr class="noprint"><h1 id="rfc.section.4" class="np"><a href="#rfc.section.4">4.</a> EXAMPLES</h1><h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> Example 1</h2><p id="rfc.section.4.1.p.1">Most detail of request and response headers has been omitted. Assume the user agent has no stored cookies.</p><p id="rfc.section.4.1.p.2">1. User Agent -> Server</p><div id="rfc.figure.u.13"></div><pre class="text2"> 948 383 POST /acme/login HTTP/1.1 949 384 [form data] 950 </pre><p id="rfc.section.4.1.p.4">User identifies self via a form.</p> 951 <p id="rfc.section.4.1.p.5">2. Server -> User Agent</p> 952 <div id="rfc.figure.u.14"></div><pre class="text"> 385 </pre><p id="rfc.section.4.1.p.4">User identifies self via a form.</p><p id="rfc.section.4.1.p.5">2. Server -> User Agent</p><div id="rfc.figure.u.14"></div><pre class="text"> 953 386 HTTP/1.1 200 OK 954 387 Set-Cookie2: Customer="WILE_E_COYOTE"; Version="1"; Path="/acme" 955 </pre><p id="rfc.section.4.1.p.7">Cookie reflects user's identity.</p> 956 <p id="rfc.section.4.1.p.8">3. User Agent -> Server</p> 957 <div id="rfc.figure.u.15"></div><pre class="text2"> 388 </pre><p id="rfc.section.4.1.p.7">Cookie reflects user's identity.</p><p id="rfc.section.4.1.p.8">3. User Agent -> Server</p><div id="rfc.figure.u.15"></div><pre class="text2"> 958 389 POST /acme/pickitem HTTP/1.1 959 390 Cookie: $Version="1"; Customer="WILE_E_COYOTE"; $Path="/acme" 960 391 [form data] 961 </pre><p id="rfc.section.4.1.p.10">User selects an item for "shopping basket".</p> 962 <p id="rfc.section.4.1.p.11">4. Server -> User Agent</p> 963 <div id="rfc.figure.u.16"></div><pre class="text"> 392 </pre><p id="rfc.section.4.1.p.10">User selects an item for "shopping basket".</p><p id="rfc.section.4.1.p.11">4. Server -> User Agent</p><div id="rfc.figure.u.16"></div><pre class="text"> 964 393 HTTP/1.1 200 OK 965 394 Set-Cookie2: Part_Number="Rocket_Launcher_0001"; Version="1"; 966 395 Path="/acme" 967 </pre><p id="rfc.section.4.1.p.13">Shopping basket contains an item.</p> 968 <p id="rfc.section.4.1.p.14">5. User Agent -> Server</p> 969 <div id="rfc.figure.u.17"></div><pre class="text2"> 396 </pre><p id="rfc.section.4.1.p.13">Shopping basket contains an item.</p><p id="rfc.section.4.1.p.14">5. User Agent -> Server</p><div id="rfc.figure.u.17"></div><pre class="text2"> 970 397 POST /acme/shipping HTTP/1.1 971 398 Cookie: $Version="1"; … … 973 400 Part_Number="Rocket_Launcher_0001"; $Path="/acme" 974 401 [form data] 975 </pre><p id="rfc.section.4.1.p.16">User selects shipping method from form.</p> 976 <p id="rfc.section.4.1.p.17">6. Server -> User Agent</p> 977 <div id="rfc.figure.u.18"></div><pre class="text"> 402 </pre><p id="rfc.section.4.1.p.16">User selects shipping method from form.</p><p id="rfc.section.4.1.p.17">6. Server -> User Agent</p><div id="rfc.figure.u.18"></div><pre class="text"> 978 403 HTTP/1.1 200 OK 979 404 Set-Cookie2: Shipping="FedEx"; Version="1"; Path="/acme" 980 </pre><p id="rfc.section.4.1.p.19">New cookie reflects shipping method.</p> 981 <p id="rfc.section.4.1.p.20">7. User Agent -> Server</p> 982 <div id="rfc.figure.u.19"></div><pre class="text2"> 405 </pre><p id="rfc.section.4.1.p.19">New cookie reflects shipping method.</p><p id="rfc.section.4.1.p.20">7. User Agent -> Server</p><div id="rfc.figure.u.19"></div><pre class="text2"> 983 406 POST /acme/process HTTP/1.1 984 407 Cookie: $Version="1"; … … 987 410 Shipping="FedEx"; $Path="/acme" 988 411 [form data] 989 </pre><p id="rfc.section.4.1.p.22">User chooses to process order.</p> 990 <p id="rfc.section.4.1.p.23">8. Server -> User Agent</p> 991 <div id="rfc.figure.u.20"></div><pre class="text"> 412 </pre><p id="rfc.section.4.1.p.22">User chooses to process order.</p><p id="rfc.section.4.1.p.23">8. Server -> User Agent</p><div id="rfc.figure.u.20"></div><pre class="text"> 992 413 HTTP/1.1 200 OK 993 </pre><p id="rfc.section.4.1.p.25">Transaction is complete.</p> 994 <p id="rfc.section.4.1.p.26">The user agent makes a series of requests on the origin server, after each of which it receives a new cookie. All the cookies 995 have the same Path attribute and (default) domain. Because the request-URIs all path-match /acme, the Path attribute of each 996 cookie, each request contains all the cookies received so far. 997 </p> 998 <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a> Example 2 999 </h2> 1000 <p id="rfc.section.4.2.p.1">This example illustrates the effect of the Path attribute. All detail of request and response headers has been omitted. Assume 1001 the user agent has no stored cookies. 1002 </p> 1003 <p id="rfc.section.4.2.p.2">Imagine the user agent has received, in response to earlier requests, the response headers</p> 1004 <div id="rfc.figure.u.21"></div><pre class="text"> 414 </pre><p id="rfc.section.4.1.p.25">Transaction is complete.</p><p id="rfc.section.4.1.p.26">The user agent makes a series of requests on the origin server, after each of which it receives a new cookie. All the cookies have the same Path attribute and (default) domain. Because the request-URIs all path-match /acme, the Path attribute of each cookie, each request contains all the cookies received so far.</p><h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a> Example 2</h2><p id="rfc.section.4.2.p.1">This example illustrates the effect of the Path attribute. All detail of request and response headers has been omitted. Assume the user agent has no stored cookies.</p><p id="rfc.section.4.2.p.2">Imagine the user agent has received, in response to earlier requests, the response headers</p><div id="rfc.figure.u.21"></div><pre class="text"> 1005 415 Set-Cookie2: Part_Number="Rocket_Launcher_0001"; Version="1"; 1006 416 Path="/acme" 1007 </pre><p id="rfc.section.4.2.p.4">and</p> 1008 <div id="rfc.figure.u.22"></div><pre class="text"> 417 </pre><p id="rfc.section.4.2.p.4">and</p><div id="rfc.figure.u.22"></div><pre class="text"> 1009 418 Set-Cookie2: Part_Number="Riding_Rocket_0023"; Version="1"; 1010 419 Path="/acme/ammo" 1011 </pre><p id="rfc.section.4.2.p.6">A subsequent request by the user agent to the (same) server for URLs of the form /acme/ammo/... would include the following 1012 request header: 1013 </p> 1014 <div id="rfc.figure.u.23"></div><pre class="text"> 420 </pre><p id="rfc.section.4.2.p.6">A subsequent request by the user agent to the (same) server for URLs of the form /acme/ammo/... would include the following request header:</p><div id="rfc.figure.u.23"></div><pre class="text"> 1015 421 Cookie: $Version="1"; 1016 422 Part_Number="Riding_Rocket_0023"; $Path="/acme/ammo"; 1017 423 Part_Number="Rocket_Launcher_0001"; $Path="/acme" 1018 </pre><p id="rfc.section.4.2.p.8">Note that the NAME=VALUE pair for the cookie with the more specific Path attribute, /acme/ammo, comes before the one with 1019 the less specific Path attribute, /acme. Further note that the same cookie name appears more than once. 1020 </p> 1021 <p id="rfc.section.4.2.p.9">A subsequent request by the user agent to the (same) server for a URL of the form /acme/parts/ would include the following 1022 request header: 1023 </p> 1024 <div id="rfc.figure.u.24"></div><pre class="text"> 424 </pre><p id="rfc.section.4.2.p.8">Note that the NAME=VALUE pair for the cookie with the more specific Path attribute, /acme/ammo, comes before the one with the less specific Path attribute, /acme. Further note that the same cookie name appears more than once.</p><p id="rfc.section.4.2.p.9">A subsequent request by the user agent to the (same) server for a URL of the form /acme/parts/ would include the following request header:</p><div id="rfc.figure.u.24"></div><pre class="text"> 1025 425 Cookie: $Version="1"; Part_Number="Rocket_Launcher_0001"; 1026 426 $Path="/acme" 1027 </pre><p id="rfc.section.4.2.p.11">Here, the second cookie's Path attribute /acme/ammo is not a prefix of the request URL, /acme/parts/, so the cookie does not 1028 get forwarded to the server. 1029 </p> 1030 <hr class="noprint"> 1031 <h1 id="rfc.section.5" class="np"><a href="#rfc.section.5">5.</a> IMPLEMENTATION CONSIDERATIONS 1032 </h1> 1033 <p id="rfc.section.5.p.1">Here we provide guidance on likely or desirable details for an origin server that implements state management.</p> 1034 <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a> Set-Cookie2 Content 1035 </h2> 1036 <p id="rfc.section.5.1.p.1">An origin server's content should probably be divided into disjoint application areas, some of which require the use of state 1037 information. The application areas can be distinguished by their request URLs. The Set-Cookie2 header can incorporate information 1038 about the application areas by setting the Path attribute for each one. 1039 </p> 1040 <p id="rfc.section.5.1.p.2">The session information can obviously be clear or encoded text that describes state. However, if it grows too large, it can 1041 become unwieldy. Therefore, an implementor might choose for the session information to be a key to a server-side resource. 1042 Of course, using a database creates some problems that this state management specification was meant to avoid, namely: 1043 </p> 1044 <ol> 1045 <li>keeping real state on the server side;</li> 1046 <li>how and when to garbage-collect the database entry, in case the user agent terminates the session by, for example, exiting.</li> 1047 </ol> 1048 <h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a> Stateless Pages 1049 </h2> 1050 <p id="rfc.section.5.2.p.1">Caching benefits the scalability of WWW. Therefore it is important to reduce the number of documents that have state embedded 1051 in them inherently. For example, if a shopping-basket-style application always displays a user's current basket contents on 1052 each page, those pages cannot be cached, because each user's basket's contents would be different. On the other hand, if each 1053 page contains just a link that allows the user to "Look at My Shopping Basket", the page can be cached. 1054 </p> 1055 <h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a> Implementation Limits 1056 </h2> 1057 <p id="rfc.section.5.3.p.1">Practical user agent implementations have limits on the number and size of cookies that they can store. In general, user agents' 1058 cookie support should have no fixed limits. They should strive to store as many frequently-used cookies as possible. Furthermore, 1059 general-use user agents <em class="bcp14">SHOULD</em> provide each of the following minimum capabilities individually, although not necessarily simultaneously: 1060 </p> 1061 <ul> 1062 <li>at least 300 cookies</li> 1063 <li>at least 4096 bytes per cookie (as measured by the characters that comprise the cookie non-terminal in the syntax description 1064 of the Set-Cookie2 header, and as received in the Set-Cookie2 header) 1065 </li> 1066 <li>at least 20 cookies per unique host or domain name</li> 1067 </ul> 1068 <p id="rfc.section.5.3.p.2">User agents created for specific purposes or for limited-capacity devices <em class="bcp14">SHOULD</em> provide at least 20 cookies of 4096 bytes, to ensure that the user can interact with a session-based origin server. 1069 </p> 1070 <p id="rfc.section.5.3.p.3">The information in a Set-Cookie2 response header <em class="bcp14">MUST</em> be retained in its entirety. If for some reason there is inadequate space to store the cookie, it <em class="bcp14">MUST</em> be discarded, not truncated. 1071 </p> 1072 <p id="rfc.section.5.3.p.4">Applications should use as few and as small cookies as possible, and they should cope gracefully with the loss of a cookie.</p> 1073 <h3 id="rfc.section.5.3.1"><a href="#rfc.section.5.3.1">5.3.1</a> Denial of Service Attacks 1074 </h3> 1075 <p id="rfc.section.5.3.1.p.1">User agents <em class="bcp14">MAY</em> choose to set an upper bound on the number of cookies to be stored from a given host or domain name or on the size of the 1076 cookie information. Otherwise a malicious server could attempt to flood a user agent with many cookies, or large cookies, 1077 on successive responses, which would force out cookies the user agent had received from other servers. However, the minima 1078 specified above <em class="bcp14">SHOULD</em> still be supported. 1079 </p> 1080 <hr class="noprint"> 1081 <h1 id="rfc.section.6" class="np"><a href="#rfc.section.6">6.</a> PRIVACY 1082 </h1> 1083 <p id="rfc.section.6.p.1">Informed consent should guide the design of systems that use cookies. A user should be able to find out how a web site plans 1084 to use information in a cookie and should be able to choose whether or not those policies are acceptable. Both the user agent 1085 and the origin server must assist informed consent. 1086 </p> 1087 <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a> User Agent Control 1088 </h2> 1089 <p id="rfc.section.6.1.p.1">An origin server could create a Set-Cookie2 header to track the path of a user through the server. Users may object to this 1090 behavior as an intrusive accumulation of information, even if their identity is not evident. (Identity might become evident, 1091 for example, if a user subsequently fills out a form that contains identifying information.) This state management specification 1092 therefore requires that a user agent give the user control over such a possible intrusion, although the interface through 1093 which the user is given this control is left unspecified. However, the control mechanisms provided <em class="bcp14">SHALL</em> at least allow the user 1094 </p> 1095 <ul> 1096 <li>to completely disable the sending and saving of cookies.</li> 1097 <li>to determine whether a stateful session is in progress.</li> 1098 <li>to control the saving of a cookie on the basis of the cookie's Domain attribute.</li> 1099 </ul> 1100 <p id="rfc.section.6.1.p.2">Such control could be provided, for example, by mechanisms </p> 1101 <ul> 1102 <li>to notify the user when the user agent is about to send a cookie to the origin server, to offer the option not to begin a 1103 session. 1104 </li> 1105 <li>to display a visual indication that a stateful session is in progress.</li> 1106 <li>to let the user decide which cookies, if any, should be saved when the user concludes a window or user agent session.</li> 1107 <li>to let the user examine and delete the contents of a cookie at any time.</li> 1108 </ul> 1109 <p id="rfc.section.6.1.p.3">A user agent usually begins execution with no remembered state information. It <em class="bcp14">SHOULD</em> be possible to configure a user agent never to send Cookie headers, in which case it can never sustain state with an origin 1110 server. (The user agent would then behave like one that is unaware of how to handle Set-Cookie2 response headers.) 1111 </p> 1112 <p id="rfc.section.6.1.p.4">When the user agent terminates execution, it <em class="bcp14">SHOULD</em> let the user discard all state information. Alternatively, the user agent <em class="bcp14">MAY</em> ask the user whether state information should be retained; the default should be "no". If the user chooses to retain state 1113 information, it would be restored the next time the user agent runs. 1114 </p> 1115 <p id="rfc.section.6.1.p.5">NOTE: User agents should probably be cautious about using files to store cookies long-term. If a user runs more than one instance 1116 of the user agent, the cookies could be commingled or otherwise corrupted. 1117 </p> 1118 <h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a> Origin Server Role 1119 </h2> 1120 <p id="rfc.section.6.2.p.1">An origin server <em class="bcp14">SHOULD</em> promote informed consent by adding CommentURL or Comment information to the cookies it sends. CommentURL is preferred because 1121 of the opportunity to provide richer information in a multiplicity of languages. 1122 </p> 1123 <h2 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a> Clear Text 1124 </h2> 1125 <p id="rfc.section.6.3.p.1">The information in the Set-Cookie2 and Cookie headers is unprotected. As a consequence: </p> 1126 <ol> 1127 <li>Any sensitive information that is conveyed in them is exposed to intruders.</li> 1128 <li>A malicious intermediary could alter the headers as they travel in either direction, with unpredictable results.</li> 1129 </ol> 1130 <p id="rfc.section.6.3.p.2">These facts imply that information of a personal and/or financial nature should only be sent over a secure channel. For less 1131 sensitive information, or when the content of the header is a database key, an origin server should be vigilant to prevent 1132 a bad Cookie value from causing failures. 1133 </p> 1134 <p id="rfc.section.6.3.p.3">A user agent in a shared user environment poses a further risk. Using a cookie inspection interface, User B could examine 1135 the contents of cookies that were saved when User A used the machine. 1136 </p> 1137 <hr class="noprint"> 1138 <h1 id="rfc.section.7" class="np"><a href="#rfc.section.7">7.</a> SECURITY CONSIDERATIONS 1139 </h1> 1140 <h2 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1</a> Protocol Design 1141 </h2> 1142 <p id="rfc.section.7.1.p.1">The restrictions on the value of the Domain attribute, and the rules concerning unverifiable transactions, are meant to reduce 1143 the ways that cookies can "leak" to the "wrong" site. The intent is to restrict cookies to one host, or a closely related 1144 set of hosts. Therefore a request-host is limited as to what values it can set for Domain. We consider it acceptable for hosts 1145 host1.foo.com and host2.foo.com to share cookies, but not a.com and b.com. 1146 </p> 1147 <p id="rfc.section.7.1.p.2">Similarly, a server can set a Path only for cookies that are related to the request-URI.</p> 1148 <h2 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a> Cookie Spoofing 1149 </h2> 1150 <p id="rfc.section.7.2.p.1">Proper application design can avoid spoofing attacks from related domains. Consider: </p> 1151 <ol> 1152 <li>User agent makes request to victim.cracker.edu, gets back cookie session_id="1234" and sets the default domain victim.cracker.edu.</li> 1153 <li>User agent makes request to spoof.cracker.edu, gets back cookie session-id="1111", with Domain=".cracker.edu".</li> 1154 <li>User agent makes request to victim.cracker.edu again, and passes 1155 <div id="rfc.figure.u.25"></div><pre class="text"> 427 </pre><p id="rfc.section.4.2.p.11">Here, the second cookie's Path attribute /acme/ammo is not a prefix of the request URL, /acme/parts/, so the cookie does not get forwarded to the server.</p><hr class="noprint"><h1 id="rfc.section.5" class="np"><a href="#rfc.section.5">5.</a> IMPLEMENTATION CONSIDERATIONS</h1><p id="rfc.section.5.p.1">Here we provide guidance on likely or desirable details for an origin server that implements state management.</p><h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a> Set-Cookie2 Content</h2><p id="rfc.section.5.1.p.1">An origin server's content should probably be divided into disjoint application areas, some of which require the use of state information. The application areas can be distinguished by their request URLs. The Set-Cookie2 header can incorporate information about the application areas by setting the Path attribute for each one.</p><p id="rfc.section.5.1.p.2">The session information can obviously be clear or encoded text that describes state. However, if it grows too large, it can become unwieldy. Therefore, an implementor might choose for the session information to be a key to a server-side resource. Of course, using a database creates some problems that this state management specification was meant to avoid, namely: </p><ol><li>keeping real state on the server side;</li><li>how and when to garbage-collect the database entry, in case the user agent terminates the session by, for example, exiting.</li></ol><h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a> Stateless Pages</h2><p id="rfc.section.5.2.p.1">Caching benefits the scalability of WWW. Therefore it is important to reduce the number of documents that have state embedded in them inherently. For example, if a shopping-basket-style application always displays a user's current basket contents on each page, those pages cannot be cached, because each user's basket's contents would be different. On the other hand, if each page contains just a link that allows the user to "Look at My Shopping Basket", the page can be cached.</p><h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a> Implementation Limits</h2><p id="rfc.section.5.3.p.1">Practical user agent implementations have limits on the number and size of cookies that they can store. In general, user agents' cookie support should have no fixed limits. They should strive to store as many frequently-used cookies as possible. Furthermore, general-use user agents <em class="bcp14">SHOULD</em> provide each of the following minimum capabilities individually, although not necessarily simultaneously: </p><ul><li>at least 300 cookies</li><li>at least 4096 bytes per cookie (as measured by the characters that comprise the cookie non-terminal in the syntax description of the Set-Cookie2 header, and as received in the Set-Cookie2 header)</li><li>at least 20 cookies per unique host or domain name</li></ul><p id="rfc.section.5.3.p.2">User agents created for specific purposes or for limited-capacity devices <em class="bcp14">SHOULD</em> provide at least 20 cookies of 4096 bytes, to ensure that the user can interact with a session-based origin server.</p><p id="rfc.section.5.3.p.3">The information in a Set-Cookie2 response header <em class="bcp14">MUST</em> be retained in its entirety. If for some reason there is inadequate space to store the cookie, it <em class="bcp14">MUST</em> be discarded, not truncated.</p><p id="rfc.section.5.3.p.4">Applications should use as few and as small cookies as possible, and they should cope gracefully with the loss of a cookie.</p><h3 id="rfc.section.5.3.1"><a href="#rfc.section.5.3.1">5.3.1</a> Denial of Service Attacks</h3><p id="rfc.section.5.3.1.p.1">User agents <em class="bcp14">MAY</em> choose to set an upper bound on the number of cookies to be stored from a given host or domain name or on the size of the cookie information. Otherwise a malicious server could attempt to flood a user agent with many cookies, or large cookies, on successive responses, which would force out cookies the user agent had received from other servers. However, the minima specified above <em class="bcp14">SHOULD</em> still be supported.</p><hr class="noprint"><h1 id="rfc.section.6" class="np"><a href="#rfc.section.6">6.</a> PRIVACY</h1><p id="rfc.section.6.p.1">Informed consent should guide the design of systems that use cookies. A user should be able to find out how a web site plans to use information in a cookie and should be able to choose whether or not those policies are acceptable. Both the user agent and the origin server must assist informed consent.</p><h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a> User Agent Control</h2><p id="rfc.section.6.1.p.1">An origin server could create a Set-Cookie2 header to track the path of a user through the server. Users may object to this behavior as an intrusive accumulation of information, even if their identity is not evident. (Identity might become evident, for example, if a user subsequently fills out a form that contains identifying information.) This state management specification therefore requires that a user agent give the user control over such a possible intrusion, although the interface through which the user is given this control is left unspecified. However, the control mechanisms provided <em class="bcp14">SHALL</em> at least allow the user </p><ul><li>to completely disable the sending and saving of cookies.</li><li>to determine whether a stateful session is in progress.</li><li>to control the saving of a cookie on the basis of the cookie's Domain attribute.</li></ul><p id="rfc.section.6.1.p.2">Such control could be provided, for example, by mechanisms </p><ul><li>to notify the user when the user agent is about to send a cookie to the origin server, to offer the option not to begin a session.</li><li>to display a visual indication that a stateful session is in progress.</li><li>to let the user decide which cookies, if any, should be saved when the user concludes a window or user agent session.</li><li>to let the user examine and delete the contents of a cookie at any time.</li></ul><p id="rfc.section.6.1.p.3">A user agent usually begins execution with no remembered state information. It <em class="bcp14">SHOULD</em> be possible to configure a user agent never to send Cookie headers, in which case it can never sustain state with an origin server. (The user agent would then behave like one that is unaware of how to handle Set-Cookie2 response headers.)</p><p id="rfc.section.6.1.p.4">When the user agent terminates execution, it <em class="bcp14">SHOULD</em> let the user discard all state information. Alternatively, the user agent <em class="bcp14">MAY</em> ask the user whether state information should be retained; the default should be "no". If the user chooses to retain state information, it would be restored the next time the user agent runs.</p><p id="rfc.section.6.1.p.5">NOTE: User agents should probably be cautious about using files to store cookies long-term. If a user runs more than one instance of the user agent, the cookies could be commingled or otherwise corrupted.</p><h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a> Origin Server Role</h2><p id="rfc.section.6.2.p.1">An origin server <em class="bcp14">SHOULD</em> promote informed consent by adding CommentURL or Comment information to the cookies it sends. CommentURL is preferred because of the opportunity to provide richer information in a multiplicity of languages.</p><h2 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a> Clear Text</h2><p id="rfc.section.6.3.p.1">The information in the Set-Cookie2 and Cookie headers is unprotected. As a consequence: </p><ol><li>Any sensitive information that is conveyed in them is exposed to intruders.</li><li>A malicious intermediary could alter the headers as they travel in either direction, with unpredictable results.</li></ol><p id="rfc.section.6.3.p.2">These facts imply that information of a personal and/or financial nature should only be sent over a secure channel. For less sensitive information, or when the content of the header is a database key, an origin server should be vigilant to prevent a bad Cookie value from causing failures.</p><p id="rfc.section.6.3.p.3">A user agent in a shared user environment poses a further risk. Using a cookie inspection interface, User B could examine the contents of cookies that were saved when User A used the machine.</p><hr class="noprint"><h1 id="rfc.section.7" class="np"><a href="#rfc.section.7">7.</a> SECURITY CONSIDERATIONS</h1><h2 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1</a> Protocol Design</h2><p id="rfc.section.7.1.p.1">The restrictions on the value of the Domain attribute, and the rules concerning unverifiable transactions, are meant to reduce the ways that cookies can "leak" to the "wrong" site. The intent is to restrict cookies to one host, or a closely related set of hosts. Therefore a request-host is limited as to what values it can set for Domain. We consider it acceptable for hosts host1.foo.com and host2.foo.com to share cookies, but not a.com and b.com.</p><p id="rfc.section.7.1.p.2">Similarly, a server can set a Path only for cookies that are related to the request-URI.</p><h2 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a> Cookie Spoofing</h2><p id="rfc.section.7.2.p.1">Proper application design can avoid spoofing attacks from related domains. Consider: </p><ol><li>User agent makes request to victim.cracker.edu, gets back cookie session_id="1234" and sets the default domain victim.cracker.edu.</li><li>User agent makes request to spoof.cracker.edu, gets back cookie session-id="1111", with Domain=".cracker.edu".</li><li>User agent makes request to victim.cracker.edu again, and passes <div id="rfc.figure.u.25"></div><pre class="text"> 1156 428 Cookie: $Version="1"; session_id="1234", 1157 429 $Version="1"; session_id="1111"; $Domain=".cracker.edu" 1158 </pre> The server at victim.cracker.edu should detect that the second cookie was not one it originated by noticing that the Domain 1159 attribute is not for itself and ignore it.</li> 1160 </ol> 1161 <h2 id="rfc.section.7.3"><a href="#rfc.section.7.3">7.3</a> Unexpected Cookie Sharing 1162 </h2> 1163 <p id="rfc.section.7.3.p.1">A user agent <em class="bcp14">SHOULD</em> make every attempt to prevent the sharing of session information between hosts that are in different domains. Embedded or 1164 inlined objects may cause particularly severe privacy problems if they can be used to share cookies between disparate hosts. 1165 For example, a malicious server could embed cookie information for host a.com in a URI for a CGI on host b.com. User agent 1166 implementors are strongly encouraged to prevent this sort of exchange whenever possible. 1167 </p> 1168 <h2 id="rfc.section.7.4"><a href="#rfc.section.7.4">7.4</a> Cookies For Account Information 1169 </h2> 1170 <p id="rfc.section.7.4.p.1">While it is common practice to use them this way, cookies are not designed or intended to be used to hold authentication information, 1171 such as account names and passwords. Unless such cookies are exchanged over an encrypted path, the account information they 1172 contain is highly vulnerable to perusal and theft. 1173 </p> 1174 <hr class="noprint"> 1175 <h1 id="rfc.section.8" class="np"><a href="#rfc.section.8">8.</a> OTHER, SIMILAR, PROPOSALS 1176 </h1> 1177 <p id="rfc.section.8.p.1">Apart from RFC 2109, three other proposals have been made to accomplish similar goals. This specification began as an amalgam 1178 of Kristol's State-Info proposal <a href="#DMK95" id="rfc.xref.DMK95.1"><cite title="Proposed HTTP State-Info Mechanism">[DMK95]</cite></a> and Netscape's Cookie proposal <a href="#Netscape" id="rfc.xref.Netscape.2"><cite title="Persistent Client State -- HTTP Cookies">[Netscape]</cite></a>. 1179 </p> 1180 <p id="rfc.section.8.p.2">Brian Behlendorf proposed a Session-ID header that would be user-agent-initiated and could be used by an origin server to 1181 track "clicktrails". It would not carry any origin-server-defined state, however. Phillip Hallam-Baker has proposed another 1182 client-defined session ID mechanism for similar purposes. 1183 </p> 1184 <p id="rfc.section.8.p.3">While both session IDs and cookies can provide a way to sustain stateful sessions, their intended purpose is different, and, 1185 consequently, the privacy requirements for them are different. A user initiates session IDs to allow servers to track progress 1186 through them, or to distinguish multiple users on a shared machine. Cookies are server-initiated, so the cookie mechanism 1187 described here gives users control over something that would otherwise take place without the users' awareness. Furthermore, 1188 cookies convey rich, server-selected information, whereas session IDs comprise user-selected, simple information. 1189 </p> 1190 <hr class="noprint"> 1191 <h1 id="rfc.section.9" class="np"><a href="#rfc.section.9">9.</a> HISTORICAL 1192 </h1> 1193 <h2 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1</a> Compatibility with Existing Implementations 1194 </h2> 1195 <p id="rfc.section.9.1.p.1">Existing cookie implementations, based on the Netscape specification, use the Set-Cookie (not Set-Cookie2) header. User agents 1196 that receive in the same response both a Set-Cookie and Set-Cookie2 response header for the same cookie <em class="bcp14">MUST</em> discard the Set-Cookie information and use only the Set-Cookie2 information. Furthermore, a user agent <em class="bcp14">MUST</em> assume, if it received a Set-Cookie2 response header, that the sending server complies with this document and will understand 1197 Cookie request headers that also follow this specification. 1198 </p> 1199 <p id="rfc.section.9.1.p.2">New cookies <em class="bcp14">MUST</em> replace both equivalent old- and new-style cookies. That is, if a user agent that follows both this specification and Netscape's 1200 original specification receives a Set-Cookie2 response header, and the NAME and the Domain and Path attributes match (per 1201 the Cookie Management section) a Netscape-style cookie, the Netscape-style cookie <em class="bcp14">MUST</em> be discarded, and the user agent <em class="bcp14">MUST</em> retain only the cookie adhering to this specification. 1202 </p> 1203 <p id="rfc.section.9.1.p.3">Older user agents that do not understand this specification, but that do understand Netscape's original specification, will 1204 not recognize the Set-Cookie2 response header and will receive and send cookies according to the older specification. 1205 </p> 1206 <p id="rfc.section.9.1.p.4">A user agent that supports both this specification and Netscape-style cookies <em class="bcp14">SHOULD</em> send a Cookie request header that follows the older Netscape specification if it received the cookie in a Set-Cookie response 1207 header and not in a Set-Cookie2 response header. However, it <em class="bcp14">SHOULD</em> send the following request header as well: 1208 </p> 1209 <div id="rfc.figure.u.26"></div><pre class="text"> 430 </pre> The server at victim.cracker.edu should detect that the second cookie was not one it originated by noticing that the Domain attribute is not for itself and ignore it.</li></ol><h2 id="rfc.section.7.3"><a href="#rfc.section.7.3">7.3</a> Unexpected Cookie Sharing</h2><p id="rfc.section.7.3.p.1">A user agent <em class="bcp14">SHOULD</em> make every attempt to prevent the sharing of session information between hosts that are in different domains. Embedded or inlined objects may cause particularly severe privacy problems if they can be used to share cookies between disparate hosts. For example, a malicious server could embed cookie information for host a.com in a URI for a CGI on host b.com. User agent implementors are strongly encouraged to prevent this sort of exchange whenever possible.</p><h2 id="rfc.section.7.4"><a href="#rfc.section.7.4">7.4</a> Cookies For Account Information</h2><p id="rfc.section.7.4.p.1">While it is common practice to use them this way, cookies are not designed or intended to be used to hold authentication information, such as account names and passwords. Unless such cookies are exchanged over an encrypted path, the account information they contain is highly vulnerable to perusal and theft.</p><hr class="noprint"><h1 id="rfc.section.8" class="np"><a href="#rfc.section.8">8.</a> OTHER, SIMILAR, PROPOSALS</h1><p id="rfc.section.8.p.1">Apart from RFC 2109, three other proposals have been made to accomplish similar goals. This specification began as an amalgam of Kristol's State-Info proposal <a href="#DMK95" id="rfc.xref.DMK95.1"><cite title="Proposed HTTP State-Info Mechanism">[DMK95]</cite></a> and Netscape's Cookie proposal <a href="#Netscape" id="rfc.xref.Netscape.2"><cite title="Persistent Client State -- HTTP Cookies">[Netscape]</cite></a>.</p><p id="rfc.section.8.p.2">Brian Behlendorf proposed a Session-ID header that would be user-agent-initiated and could be used by an origin server to track "clicktrails". It would not carry any origin-server-defined state, however. Phillip Hallam-Baker has proposed another client-defined session ID mechanism for similar purposes.</p><p id="rfc.section.8.p.3">While both session IDs and cookies can provide a way to sustain stateful sessions, their intended purpose is different, and, consequently, the privacy requirements for them are different. A user initiates session IDs to allow servers to track progress through them, or to distinguish multiple users on a shared machine. Cookies are server-initiated, so the cookie mechanism described here gives users control over something that would otherwise take place without the users' awareness. Furthermore, cookies convey rich, server-selected information, whereas session IDs comprise user-selected, simple information.</p><hr class="noprint"><h1 id="rfc.section.9" class="np"><a href="#rfc.section.9">9.</a> HISTORICAL</h1><h2 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1</a> Compatibility with Existing Implementations</h2><p id="rfc.section.9.1.p.1">Existing cookie implementations, based on the Netscape specification, use the Set-Cookie (not Set-Cookie2) header. User agents that receive in the same response both a Set-Cookie and Set-Cookie2 response header for the same cookie <em class="bcp14">MUST</em> discard the Set-Cookie information and use only the Set-Cookie2 information. Furthermore, a user agent <em class="bcp14">MUST</em> assume, if it received a Set-Cookie2 response header, that the sending server complies with this document and will understand Cookie request headers that also follow this specification.</p><p id="rfc.section.9.1.p.2">New cookies <em class="bcp14">MUST</em> replace both equivalent old- and new-style cookies. That is, if a user agent that follows both this specification and Netscape's original specification receives a Set-Cookie2 response header, and the NAME and the Domain and Path attributes match (per the Cookie Management section) a Netscape-style cookie, the Netscape-style cookie <em class="bcp14">MUST</em> be discarded, and the user agent <em class="bcp14">MUST</em> retain only the cookie adhering to this specification.</p><p id="rfc.section.9.1.p.3">Older user agents that do not understand this specification, but that do understand Netscape's original specification, will not recognize the Set-Cookie2 response header and will receive and send cookies according to the older specification.</p><p id="rfc.section.9.1.p.4">A user agent that supports both this specification and Netscape-style cookies <em class="bcp14">SHOULD</em> send a Cookie request header that follows the older Netscape specification if it received the cookie in a Set-Cookie response header and not in a Set-Cookie2 response header. However, it <em class="bcp14">SHOULD</em> send the following request header as well:</p><div id="rfc.figure.u.26"></div><pre class="text"> 1210 431 Cookie2: $Version="1" 1211 </pre><p id="rfc.section.9.1.p.6">The Cookie2 header advises the server that the user agent understands new-style cookies. If the server understands new-style 1212 cookies, as well, it <em class="bcp14">SHOULD</em> continue the stateful session by sending a Set-Cookie2 response header, rather than Set-Cookie. A server that does not understand 1213 new-style cookies will simply ignore the Cookie2 request header. 1214 </p> 1215 <h2 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2</a> Caching and HTTP/1.0 1216 </h2> 1217 <p id="rfc.section.9.2.p.1">Some caches, such as those conforming to HTTP/1.0, will inevitably cache the Set-Cookie2 and Set-Cookie headers, because there 1218 was no mechanism to suppress caching of headers prior to HTTP/1.1. This caching can lead to security problems. Documents transmitted 1219 by an origin server along with Set-Cookie2 and Set-Cookie headers usually either will be uncachable, or will be "pre-expired". 1220 As long as caches obey instructions not to cache documents (following Expires: <a date in the past> or Pragma: no-cache (HTTP/1.0), 1221 or Cache-control: no-cache (HTTP/1.1)) uncachable documents present no problem. However, pre-expired documents may be stored 1222 in caches. They require validation (a conditional GET) on each new request, but some cache operators loosen the rules for 1223 their caches, and sometimes serve expired documents without first validating them. This combination of factors can lead to 1224 cookies meant for one user later being sent to another user. The Set-Cookie2 and Set-Cookie headers are stored in the cache, 1225 and, although the document is stale (expired), the cache returns the document in response to later requests, including cached 1226 headers. 1227 </p> 1228 <hr class="noprint"> 1229 <h1 id="rfc.section.10" class="np"><a href="#rfc.section.10">10.</a> ACKNOWLEDGEMENTS 1230 </h1> 1231 <p id="rfc.section.10.p.1">This document really represents the collective efforts of the HTTP Working Group of the IETF and, particularly, the following 1232 people, in addition to the authors: Roy Fielding, Yaron Goland, Marc Hedlund, Ted Hardie, Koen Holtman, Shel Kaphan, Rohit 1233 Khare, Foteos Macrides, David W. Morris. 1234 </p> 1235 <h1 class="np" id="rfc.references"><a href="#rfc.section.11" id="rfc.section.11">11.</a> References 1236 </h1> 1237 <table summary="References"> 1238 <tr> 1239 <td class="reference"><b id="DMK95">[DMK95]</b></td> 1240 <td class="top">Kristol, D. M., “<a href="http://portal.research.bell-labs.com/~dmk/state-info.html">Proposed HTTP State-Info Mechanism</a>”, September 1995, <<a href="http://portal.research.bell-labs.com/~dmk/state-info.html">http://portal.research.bell-labs.com/~dmk/state-info.html</a>>.<br>available at <http://portal.research.bell-labs.com/~dmk/state-info.html> 1241 </td> 1242 </tr> 1243 <tr> 1244 <td class="reference"><b id="Netscape">[Netscape]</b></td> 1245 <td class="top">“<a href="http://www.netscape.com/newsref/std/cookie_spec.html">Persistent Client State -- HTTP Cookies</a>”, <<a href="http://www.netscape.com/newsref/std/cookie_spec.html">http://www.netscape.com/newsref/std/cookie_spec.html</a>>.<br>available at <http://www.netscape.com/newsref/std/cookie_spec.html> 1246 </td> 1247 </tr> 1248 <tr> 1249 <td class="reference"><b id="RFC2109">[RFC2109]</b></td> 1250 <td class="top"><a href="mailto:dmk@bell-labs.com" title="Bell Laboratories, Lucent Technologies">Kristol, D.M.</a> and <a href="mailto:montulli@netscape.com" title="Netscape Communications Corp.">L. Montulli</a>, “<a href="http://tools.ietf.org/html/rfc2109">HTTP State Management Mechanism</a>”, RFC 2109, February 1997. 1251 </td> 1252 </tr> 1253 <tr> 1254 <td class="reference"><b id="RFC2119">[RFC2119]</b></td> 1255 <td class="top"><a href="mailto:sob@harvard.edu" title="Harvard University">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP 14, RFC 2119, March 1997. 1256 </td> 1257 </tr> 1258 <tr> 1259 <td class="reference"><b id="RFC2279">[RFC2279]</b></td> 1260 <td class="top"><a href="mailto:fyergeau@alis.com" title="Alis Technologies">Yergeau, F.</a>, “<a href="http://tools.ietf.org/html/rfc2279">UTF-8, a transformation format of ISO 10646</a>”, RFC 2279, January 1998. 1261 </td> 1262 </tr> 1263 <tr> 1264 <td class="reference"><b id="RFC2396">[RFC2396]</b></td> 1265 <td class="top"><a href="mailto:timbl@w3.org" title="World Wide Web Consortium">Berners-Lee, T.</a>, <a href="mailto:fielding@ics.uci.edu" title="Department of Information and Computer Science">Fielding, R.T.</a>, and <a href="mailto:masinter@parc.xerox.com" title="Xerox PARC">L. Masinter</a>, “<a href="http://tools.ietf.org/html/rfc2396">Uniform Resource Identifiers (URI): Generic Syntax</a>”, RFC 2396, August 1998. 1266 </td> 1267 </tr> 1268 <tr> 1269 <td class="reference"><b id="RFC2616">[RFC2616]</b></td> 1270 <td class="top"><a href="mailto:fielding@ics.uci.edu" title="University of California, Irvine">Fielding, R.</a>, <a href="mailto:jg@w3.org" title="W3C">Gettys, J.</a>, <a href="mailto:mogul@wrl.dec.com" title="Compaq Computer Corporation">Mogul, J.</a>, <a href="mailto:frystyk@w3.org" title="MIT Laboratory for Computer Science">Frystyk, H.</a>, <a href="mailto:masinter@parc.xerox.com" title="Xerox Corporation">Masinter, L.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, and <a href="mailto:timbl@w3.org" title="W3C">T. Berners-Lee</a>, “<a href="http://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC 2616, June 1999. 1271 </td> 1272 </tr> 1273 </table> 1274 <hr class="noprint"> 1275 <h1 id="rfc.authors" class="np"><a href="#rfc.authors">Authors' Addresses</a></h1> 1276 <address class="vcard"><span class="vcardline"><span class="fn">David M. Kristol</span><span class="n hidden"><span class="family-name">Kristol</span><span class="given-name">David M.</span></span></span><span class="org vcardline">Bell Laboratories, Lucent Technologies</span><span class="adr"><span class="street-address vcardline">600 Mountain Ave. Room 2A-333</span><span class="vcardline"><span class="locality">Murray Hill</span>, <span class="region">NJ</span> <span class="postal-code">07974</span></span></span><span class="vcardline tel">Phone: <a href="tel:(908)582-2250"><span class="value">(908) 582-2250</span></a></span><span class="vcardline tel"><span class="type">Fax</span>: <a href="fax:(908)582-1239"><span class="value">(908) 582-1239</span></a></span><span class="vcardline">EMail: <a href="mailto:dmk@bell-labs.com"><span class="email">dmk@bell-labs.com</span></a></span></address> 1277 <address class="vcard"><span class="vcardline"><span class="fn">Lou Montulli</span><span class="n hidden"><span class="family-name">Montulli</span><span class="given-name">Lou</span></span></span><span class="org vcardline">Epinions.com, Inc.</span><span class="adr"><span class="street-address vcardline">2037 Landings Dr.</span><span class="vcardline"><span class="locality">Mountain View</span>, <span class="region">CA</span> <span class="postal-code">94301</span></span></span><span class="vcardline">EMail: <a href="mailto:lou@montulli.org"><span class="email">lou@montulli.org</span></a></span></address> 1278 <h1><a id="rfc.copyright" href="#rfc.copyright">Full Copyright Statement</a></h1> 1279 <p>Copyright © The Internet Society (2000). All Rights Reserved.</p> 1280 <p>This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise 1281 explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without 1282 restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative 1283 works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references 1284 to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards 1285 in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to 1286 translate it into languages other than English. 1287 </p> 1288 <p>The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assignees.</p> 1289 <p>This document and the information contained herein is provided on an “;AS IS” basis and THE INTERNET SOCIETY AND THE INTERNET 1290 ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE 1291 OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR 1292 PURPOSE. 1293 </p> 1294 <hr class="noprint"> 1295 <h1 class="np"><a id="rfc.ipr" href="#rfc.ipr">Intellectual Property</a></h1> 1296 <p>The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed 1297 to pertain to the implementation or use of the technology described in this document or the extent to which any license under 1298 such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. 1299 Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be 1300 found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, 1301 or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors 1302 or users of this specification can be obtained from the IETF Secretariat. 1303 </p> 1304 <p>The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary 1305 rights which may cover technology that may be required to practice this standard. Please address the information to the IETF 1306 Executive Director. 1307 </p> 1308 <h1>Acknowledgement</h1> 1309 <p>Funding for the RFC Editor function is currently provided by the Internet Society.</p> 1310 <hr class="noprint"> 1311 <h1 id="rfc.index" class="np"><a href="#rfc.index">Index</a></h1> 1312 <p class="noprint"><a href="#rfc.index.C">C</a> <a href="#rfc.index.D">D</a> <a href="#rfc.index.H">H</a> <a href="#rfc.index.N">N</a> <a href="#rfc.index.R">R</a> <a href="#rfc.index.S">S</a> 1313 </p> 1314 <div class="print2col"> 1315 <ul class="ind"> 1316 <li class="indline0"><a id="rfc.index.C" href="#rfc.index.C"><b>C</b></a><ul class="ind"> 1317 <li class="indline1">Cookie header <a class="iref" href="#rfc.iref.c.1"><b>3.3.4</b></a></li> 1318 <li class="indline1">Cookie2 header <a class="iref" href="#rfc.iref.c.2"><b>3.3.5</b></a></li> 1319 </ul> 1320 </li> 1321 <li class="indline0"><a id="rfc.index.D" href="#rfc.index.D"><b>D</b></a><ul class="ind"> 1322 <li class="indline1"><em>DMK95</em> <a class="iref" href="#rfc.xref.DMK95.1">8</a>, <a class="iref" href="#DMK95"><b>11</b></a></li> 1323 </ul> 1324 </li> 1325 <li class="indline0"><a id="rfc.index.H" href="#rfc.index.H"><b>H</b></a><ul class="ind"> 1326 <li class="indline1">Headers 1327 <ul class="ind"> 1328 <li class="indline1">Cookie <a class="iref" href="#rfc.iref.h.2"><b>3.3.4</b></a></li> 1329 <li class="indline1">Cookie2 <a class="iref" href="#rfc.iref.h.3"><b>3.3.5</b></a></li> 1330 <li class="indline1">Set-Cookie2 <a class="iref" href="#rfc.iref.h.1"><b>3.2.2</b></a></li> 1331 </ul> 1332 </li> 1333 </ul> 1334 </li> 1335 <li class="indline0"><a id="rfc.index.N" href="#rfc.index.N"><b>N</b></a><ul class="ind"> 1336 <li class="indline1"><em>Netscape</em> <a class="iref" href="#rfc.xref.Netscape.1">§</a>, <a class="iref" href="#rfc.xref.Netscape.2">8</a>, <a class="iref" href="#Netscape"><b>11</b></a></li> 1337 </ul> 1338 </li> 1339 <li class="indline0"><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul class="ind"> 1340 <li class="indline1"><em>RFC2109</em> <a class="iref" href="#RFC2109"><b>11</b></a></li> 1341 <li class="indline1"><em>RFC2119</em> <a class="iref" href="#rfc.xref.RFC2119.1">1.1</a>, <a class="iref" href="#RFC2119"><b>11</b></a></li> 1342 <li class="indline1"><em>RFC2279</em> <a class="iref" href="#rfc.xref.RFC2279.1">3.2.2</a>, <a class="iref" href="#RFC2279"><b>11</b></a></li> 1343 <li class="indline1"><em>RFC2396</em> <a class="iref" href="#rfc.xref.RFC2396.1">1</a>, <a class="iref" href="#RFC2396"><b>11</b></a></li> 1344 <li class="indline1"><em>RFC2616</em> <a class="iref" href="#rfc.xref.RFC2616.1">1</a>, <a class="iref" href="#rfc.xref.RFC2616.2">3.1</a>, <a class="iref" href="#rfc.xref.RFC2616.3">3.2.2</a>, <a class="iref" href="#RFC2616"><b>11</b></a></li> 1345 </ul> 1346 </li> 1347 <li class="indline0"><a id="rfc.index.S" href="#rfc.index.S"><b>S</b></a><ul class="ind"> 1348 <li class="indline1">Set-Cookie2 header <a class="iref" href="#rfc.iref.s.1"><b>3.2.2</b></a></li> 1349 </ul> 1350 </li> 1351 </ul> 1352 </div> 1353 </body> 1354 </html> 432 </pre><p id="rfc.section.9.1.p.6">The Cookie2 header advises the server that the user agent understands new-style cookies. If the server understands new-style cookies, as well, it <em class="bcp14">SHOULD</em> continue the stateful session by sending a Set-Cookie2 response header, rather than Set-Cookie. A server that does not understand new-style cookies will simply ignore the Cookie2 request header.</p><h2 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2</a> Caching and HTTP/1.0</h2><p id="rfc.section.9.2.p.1">Some caches, such as those conforming to HTTP/1.0, will inevitably cache the Set-Cookie2 and Set-Cookie headers, because there was no mechanism to suppress caching of headers prior to HTTP/1.1. This caching can lead to security problems. Documents transmitted by an origin server along with Set-Cookie2 and Set-Cookie headers usually either will be uncachable, or will be "pre-expired". As long as caches obey instructions not to cache documents (following Expires: <a date in the past> or Pragma: no-cache (HTTP/1.0), or Cache-control: no-cache (HTTP/1.1)) uncachable documents present no problem. However, pre-expired documents may be stored in caches. They require validation (a conditional GET) on each new request, but some cache operators loosen the rules for their caches, and sometimes serve expired documents without first validating them. This combination of factors can lead to cookies meant for one user later being sent to another user. The Set-Cookie2 and Set-Cookie headers are stored in the cache, and, although the document is stale (expired), the cache returns the document in response to later requests, including cached headers.</p><hr class="noprint"><h1 id="rfc.section.10" class="np"><a href="#rfc.section.10">10.</a> ACKNOWLEDGEMENTS</h1><p id="rfc.section.10.p.1">This document really represents the collective efforts of the HTTP Working Group of the IETF and, particularly, the following people, in addition to the authors: Roy Fielding, Yaron Goland, Marc Hedlund, Ted Hardie, Koen Holtman, Shel Kaphan, Rohit Khare, Foteos Macrides, David W. Morris.</p><h1 class="np" id="rfc.references"><a href="#rfc.section.11" id="rfc.section.11">11.</a> References</h1><table summary="References"> <tr><td class="reference"><b id="DMK95">[DMK95]</b></td><td class="top">Kristol, D. M., “<a href="http://portal.research.bell-labs.com/~dmk/state-info.html">Proposed HTTP State-Info Mechanism</a>”, September 1995, <<a href="http://portal.research.bell-labs.com/~dmk/state-info.html">http://portal.research.bell-labs.com/~dmk/state-info.html</a>>.<br>available at <http://portal.research.bell-labs.com/~dmk/state-info.html></td></tr> <tr><td class="reference"><b id="Netscape">[Netscape]</b></td><td class="top">“<a href="http://www.netscape.com/newsref/std/cookie_spec.html">Persistent Client State -- HTTP Cookies</a>”, <<a href="http://www.netscape.com/newsref/std/cookie_spec.html">http://www.netscape.com/newsref/std/cookie_spec.html</a>>.<br>available at <http://www.netscape.com/newsref/std/cookie_spec.html></td></tr> <tr><td class="reference"><b id="RFC2109">[RFC2109]</b></td><td class="top"><a href="mailto:dmk@bell-labs.com" title="Bell Laboratories, Lucent Technologies">Kristol, D.M.</a> and <a href="mailto:montulli@netscape.com" title="Netscape Communications Corp.">L. Montulli</a>, “<a href="http://tools.ietf.org/html/rfc2109">HTTP State Management Mechanism</a>”, RFC 2109, February 1997.</td></tr> <tr><td class="reference"><b id="RFC2119">[RFC2119]</b></td><td class="top"><a href="mailto:sob@harvard.edu" title="Harvard University">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP 14, RFC 2119, March 1997.</td></tr> <tr><td class="reference"><b id="RFC2279">[RFC2279]</b></td><td class="top"><a href="mailto:fyergeau@alis.com" title="Alis Technologies">Yergeau, F.</a>, “<a href="http://tools.ietf.org/html/rfc2279">UTF-8, a transformation format of ISO 10646</a>”, RFC 2279, January 1998.</td></tr> <tr><td class="reference"><b id="RFC2396">[RFC2396]</b></td><td class="top"><a href="mailto:timbl@w3.org" title="World Wide Web Consortium">Berners-Lee, T.</a>, <a href="mailto:fielding@ics.uci.edu" title="Department of Information and Computer Science">Fielding, R.T.</a>, and <a href="mailto:masinter@parc.xerox.com" title="Xerox PARC">L. Masinter</a>, “<a href="http://tools.ietf.org/html/rfc2396">Uniform Resource Identifiers (URI): Generic Syntax</a>”, RFC 2396, August 1998.</td></tr> <tr><td class="reference"><b id="RFC2616">[RFC2616]</b></td><td class="top"><a href="mailto:fielding@ics.uci.edu" title="University of California, Irvine">Fielding, R.</a>, <a href="mailto:jg@w3.org" title="W3C">Gettys, J.</a>, <a href="mailto:mogul@wrl.dec.com" title="Compaq Computer Corporation">Mogul, J.</a>, <a href="mailto:frystyk@w3.org" title="MIT Laboratory for Computer Science">Frystyk, H.</a>, <a href="mailto:masinter@parc.xerox.com" title="Xerox Corporation">Masinter, L.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, and <a href="mailto:timbl@w3.org" title="W3C">T. Berners-Lee</a>, “<a href="http://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC 2616, June 1999.</td></tr> </table><hr class="noprint"><h1 id="rfc.authors" class="np"><a href="#rfc.authors">Authors' Addresses</a></h1><address class="vcard"><span class="vcardline"><span class="fn">David M. Kristol</span><span class="n hidden"><span class="family-name">Kristol</span><span class="given-name">David M.</span></span></span><span class="org vcardline">Bell Laboratories, Lucent Technologies</span><span class="adr"><span class="street-address vcardline">600 Mountain Ave. Room 2A-333</span><span class="vcardline"><span class="locality">Murray Hill</span>, <span class="region">NJ</span> <span class="postal-code">07974</span></span></span><span class="vcardline tel">Phone: <a href="tel:(908)582-2250"><span class="value">(908) 582-2250</span></a></span><span class="vcardline tel"><span class="type">Fax</span>: <a href="fax:(908)582-1239"><span class="value">(908) 582-1239</span></a></span><span class="vcardline">EMail: <a href="mailto:dmk@bell-labs.com"><span class="email">dmk@bell-labs.com</span></a></span></address><address class="vcard"><span class="vcardline"><span class="fn">Lou Montulli</span><span class="n hidden"><span class="family-name">Montulli</span><span class="given-name">Lou</span></span></span><span class="org vcardline">Epinions.com, Inc.</span><span class="adr"><span class="street-address vcardline">2037 Landings Dr.</span><span class="vcardline"><span class="locality">Mountain View</span>, <span class="region">CA</span> <span class="postal-code">94301</span></span></span><span class="vcardline">EMail: <a href="mailto:lou@montulli.org"><span class="email">lou@montulli.org</span></a></span></address><h1><a id="rfc.copyright" href="#rfc.copyright">Full Copyright Statement</a></h1><p>Copyright © The Internet Society (2000). All Rights Reserved.</p><p>This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.</p><p>The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assignees.</p><p>This document and the information contained herein is provided on an “AS IS” basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.</p><hr class="noprint"><h1 class="np"><a id="rfc.ipr" href="#rfc.ipr">Intellectual Property</a></h1><p>The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification can be obtained from the IETF Secretariat.</p><p>The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director.</p><h1>Acknowledgement</h1><p>Funding for the RFC Editor function is currently provided by the Internet Society.</p><hr class="noprint"><h1 id="rfc.index" class="np"><a href="#rfc.index">Index</a></h1><p class="noprint"><a href="#rfc.index.C">C</a> <a href="#rfc.index.D">D</a> <a href="#rfc.index.H">H</a> <a href="#rfc.index.N">N</a> <a href="#rfc.index.R">R</a> <a href="#rfc.index.S">S</a> </p><div class="print2col"><ul class="ind"><li class="indline0"><a id="rfc.index.C" href="#rfc.index.C"><b>C</b></a><ul class="ind"><li class="indline1">Cookie header <a class="iref" href="#rfc.iref.c.1"><b>3.3.4</b></a></li><li class="indline1">Cookie2 header <a class="iref" href="#rfc.iref.c.2"><b>3.3.5</b></a></li></ul></li><li class="indline0"><a id="rfc.index.D" href="#rfc.index.D"><b>D</b></a><ul class="ind"><li class="indline1"><em>DMK95</em> <a class="iref" href="#rfc.xref.DMK95.1">8</a>, <a class="iref" href="#DMK95"><b>11</b></a></li></ul></li><li class="indline0"><a id="rfc.index.H" href="#rfc.index.H"><b>H</b></a><ul class="ind"><li class="indline1">Headers <ul class="ind"><li class="indline1">Cookie <a class="iref" href="#rfc.iref.h.2"><b>3.3.4</b></a></li><li class="indline1">Cookie2 <a class="iref" href="#rfc.iref.h.3"><b>3.3.5</b></a></li><li class="indline1">Set-Cookie2 <a class="iref" href="#rfc.iref.h.1"><b>3.2.2</b></a></li></ul></li></ul></li><li class="indline0"><a id="rfc.index.N" href="#rfc.index.N"><b>N</b></a><ul class="ind"><li class="indline1"><em>Netscape</em> <a class="iref" href="#rfc.xref.Netscape.1">§</a>, <a class="iref" href="#rfc.xref.Netscape.2">8</a>, <a class="iref" href="#Netscape"><b>11</b></a></li></ul></li><li class="indline0"><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul class="ind"><li class="indline1"><em>RFC2109</em> <a class="iref" href="#RFC2109"><b>11</b></a></li><li class="indline1"><em>RFC2119</em> <a class="iref" href="#rfc.xref.RFC2119.1">1.1</a>, <a class="iref" href="#RFC2119"><b>11</b></a></li><li class="indline1"><em>RFC2279</em> <a class="iref" href="#rfc.xref.RFC2279.1">3.2.2</a>, <a class="iref" href="#RFC2279"><b>11</b></a></li><li class="indline1"><em>RFC2396</em> <a class="iref" href="#rfc.xref.RFC2396.1">1</a>, <a class="iref" href="#RFC2396"><b>11</b></a></li><li class="indline1"><em>RFC2616</em> <a class="iref" href="#rfc.xref.RFC2616.1">1</a>, <a class="iref" href="#rfc.xref.RFC2616.2">3.1</a>, <a class="iref" href="#rfc.xref.RFC2616.3">3.2.2</a>, <a class="iref" href="#RFC2616"><b>11</b></a></li></ul></li><li class="indline0"><a id="rfc.index.S" href="#rfc.index.S"><b>S</b></a><ul class="ind"><li class="indline1">Set-Cookie2 header <a class="iref" href="#rfc.iref.s.1"><b>3.2.2</b></a></li></ul></li></ul></div></body></html>
Note: See TracChangeset
for help on using the changeset viewer.