source: draft-ietf-httpbis/latest/p6-cache.xml @ 1523

Last change on this file since 1523 was 1523, checked in by julian.reschke@…, 9 years ago

refresh inclusions, regen HTML

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 121.5 KB
[29]1<?xml version="1.0" encoding="utf-8"?>
[768]2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
[8]3<!DOCTYPE rfc [
4  <!ENTITY MAY "<bcp14 xmlns=''>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns=''>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns=''>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns=''>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns=''>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns=''>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns=''>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns=''>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns=''>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns=''>SHOULD NOT</bcp14>">
[29]14  <!ENTITY ID-VERSION "latest">
[1522]15  <!ENTITY ID-MONTH "February">
[1497]16  <!ENTITY ID-YEAR "2012">
[1518]17  <!ENTITY architecture                "<xref target='Part1' x:rel='#architecture' xmlns:x=''/>">
[424]18  <!ENTITY notation                    "<xref target='Part1' x:rel='#notation' xmlns:x=''/>">
[1399]19  <!ENTITY acks                        "<xref target='Part1' x:rel='#acks' xmlns:x=''/>">
[1518]20  <!ENTITY whitespace                  "<xref target='Part1' x:rel='#whitespace' xmlns:x=''/>">
21  <!ENTITY field-components            "<xref target='Part1' x:rel='#field.components' xmlns:x=''/>">
[538]22  <!ENTITY uri                         "<xref target='Part1' x:rel='#uri' xmlns:x=''/>">
[1399]23  <!ENTITY effective-request-uri       "<xref target='Part1' x:rel='#effective.request.uri' xmlns:x=''/>">
[31]24  <!ENTITY messaging                   "<xref target='Part1' xmlns:x=''/>">
[1374]25  <!ENTITY semantics                   "<xref target='Part2' xmlns:x=''/>">
[183]26  <!ENTITY conditional                 "<xref target='Part4' xmlns:x=''/>">
[538]27  <!ENTITY partial                     "<xref target='Part5' xmlns:x=''/>">
[31]28  <!ENTITY combining-byte-ranges       "<xref target='Part5' x:rel='#combining.byte.ranges' xmlns:x=''/>">
[1436]29  <!ENTITY http-date                   "<xref target='Part2' x:rel='' xmlns:x=''/>">
[31]30  <!ENTITY header-authorization        "<xref target='Part7' x:rel='#header.authorization' xmlns:x=''/>">
31  <!ENTITY header-connection           "<xref target='Part1' x:rel='#header.connection' xmlns:x=''/>">
[1436]32  <!ENTITY header-date                 "<xref target='Part2' x:rel='' xmlns:x=''/>">
[205]33  <!ENTITY header-via                  "<xref target='Part1' x:rel='#header.via' xmlns:x=''/>">
[538]34  <!ENTITY header-last-modified        "<xref target='Part4' x:rel='#header.last-modified' xmlns:x=''/>">
[697]35  <!ENTITY header-fields               "<xref target='Part1' x:rel='#header.fields' xmlns:x=''/>">
[31]36  <!ENTITY safe-methods                "<xref target='Part2' x:rel='#safe.methods' xmlns:x=''/>">
[1374]37  <!ENTITY entity-tags                 "<xref target='Part4' x:rel='#header.etag' xmlns:x=''/>">
[607]38  <!ENTITY weak-and-strong             "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x=''/>">
[1374]39  <!ENTITY lastmod-comparison          "<xref target='Part4' x:rel='#lastmod.comparison' xmlns:x=''/>">
[914]40  <!ENTITY status-codes                "<xref target='Part2' x:rel='' xmlns:x=''/>">
[943]41  <!ENTITY status.2xx                  "<xref target='Part2' x:rel='#status.2xx' xmlns:x=''/>">
43<?rfc toc="yes" ?>
[29]44<?rfc symrefs="yes" ?>
45<?rfc sortrefs="yes" ?>
[8]46<?rfc compact="yes"?>
47<?rfc subcompact="no" ?>
48<?rfc linkmailto="no" ?>
49<?rfc editing="no" ?>
[203]50<?rfc comments="yes"?>
51<?rfc inline="yes"?>
[799]52<?rfc rfcedstyle="yes"?>
[8]53<?rfc-ext allow-markup-in-artwork="yes" ?>
54<?rfc-ext include-references-in-index="yes" ?>
[538]55<rfc category="std" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;" ipr="pre5378Trust200902"
[1477]56  obsoletes="2616" x:maturity-level="proposed" xmlns:x="">
[1472]57<x:link rel="prev" basename="p5-range"/>
58<x:link rel="next" basename="p7-auth"/>
[1522]59<x:feedback template="{docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>
[547]62  <title abbrev="HTTP/1.1, Part 6">HTTP/1.1, part 6: Caching</title>
[547]64  <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
[1106]65    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[547]66    <address>
[8]67      <postal>
[1106]68        <street>345 Park Ave</street>
69        <city>San Jose</city>
[8]70        <region>CA</region>
[1106]71        <code>95110</code>
[29]72        <country>USA</country>
[8]73      </postal>
[29]74      <email></email>
75      <uri></uri>
[8]76    </address>
[547]77  </author>
[844]79  <author initials="J." surname="Gettys" fullname="Jim Gettys">
80    <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
[547]81    <address>
[8]82      <postal>
[29]83        <street>21 Oak Knoll Road</street>
84        <city>Carlisle</city>
[8]85        <region>MA</region>
[29]86        <code>01741</code>
87        <country>USA</country>
[8]88      </postal>
[844]89      <email></email>
90      <uri></uri>
[8]91    </address>
[547]92  </author>
[547]94  <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
95    <organization abbrev="HP">Hewlett-Packard Company</organization>
96    <address>
[8]97      <postal>
[29]98        <street>HP Labs, Large Scale Systems Group</street>
99        <street>1501 Page Mill Road, MS 1177</street>
[8]100        <city>Palo Alto</city>
101        <region>CA</region>
[29]102        <code>94304</code>
103        <country>USA</country>
[8]104      </postal>
[29]105      <email></email>
[8]106    </address>
[547]107  </author>
[547]109  <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
110    <organization abbrev="Microsoft">Microsoft Corporation</organization>
111    <address>
[8]112      <postal>
[29]113        <street>1 Microsoft Way</street>
114        <city>Redmond</city>
115        <region>WA</region>
116        <code>98052</code>
117        <country>USA</country>
[8]118      </postal>
[29]119      <email></email>
[8]120    </address>
[547]121  </author>
[547]123  <author fullname="Larry Masinter" initials="L." surname="Masinter">
[1106]124    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[547]125    <address>
[8]126      <postal>
[29]127        <street>345 Park Ave</street>
128        <city>San Jose</city>
[8]129        <region>CA</region>
[29]130        <code>95110</code>
131        <country>USA</country>
[8]132      </postal>
[29]133      <email></email>
134      <uri></uri>
[8]135    </address>
[547]136  </author>
[547]138  <author fullname="Paul J. Leach" initials="P." surname="Leach">
139    <organization abbrev="Microsoft">Microsoft Corporation</organization>
140    <address>
[8]141      <postal>
142        <street>1 Microsoft Way</street>
143        <city>Redmond</city>
144        <region>WA</region>
145        <code>98052</code>
146      </postal>
147      <email></email>
148    </address>
[547]149  </author>
[547]151  <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
152    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
153    <address>
[8]154      <postal>
[34]155        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
156        <street>The Stata Center, Building 32</street>
157        <street>32 Vassar Street</street>
[8]158        <city>Cambridge</city>
159        <region>MA</region>
160        <code>02139</code>
[29]161        <country>USA</country>
[8]162      </postal>
163      <email></email>
[34]164      <uri></uri>
[8]165    </address>
[547]166  </author>
[547]168  <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
169    <organization abbrev="W3C">World Wide Web Consortium</organization>
170    <address>
[93]171      <postal>
172        <street>W3C / ERCIM</street>
173        <street>2004, rte des Lucioles</street>
174        <city>Sophia-Antipolis</city>
175        <region>AM</region>
176        <code>06902</code>
177        <country>France</country>
178      </postal>
179      <email></email>
180      <uri></uri>
181    </address>
[547]182  </author>
[601]184  <author fullname="Mark Nottingham" initials="M." role="editor" surname="Nottingham">
[1438]185    <organization>Rackspace</organization>
[607]186    <address>
187      <email></email>
188      <uri></uri>
[601]189    </address>
190  </author>
[547]192  <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
193    <organization abbrev="greenbytes">greenbytes GmbH</organization>
194    <address>
[95]195      <postal>
196        <street>Hafenweg 16</street>
197        <city>Muenster</city><region>NW</region><code>48155</code>
198        <country>Germany</country>
199      </postal>
[607]200      <phone>+49 251 2807760</phone>
201      <facsimile>+49 251 2807761</facsimile>
202      <email></email>
203      <uri></uri>
[95]204    </address>
[547]205  </author>
[547]207  <date month="&ID-MONTH;" year="&ID-YEAR;" />
208  <workgroup>HTTPbis Working Group</workgroup>
[949]212   The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
[1373]213   distributed, collaborative, hypertext information systems. HTTP has been in
214   use by the World Wide Web global information initiative since 1990. This
215   document is Part 6 of the seven-part specification that defines the protocol
216   referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616.
219   Part 6 defines requirements on HTTP caches and the associated header fields
220   that control cache behavior or indicate cacheable response messages.
[540]224<note title="Editorial Note (To be removed by RFC Editor)">
[1268]225  <t>
226    Discussion of this draft should take place on the HTTPBIS working group
227    mailing list (, which is archived at
228    <eref target=""/>.
229  </t>
230  <t>
231    The current issues list is at
232    <eref target=""/> and related
233    documents (including fancy diffs) can be found at
234    <eref target=""/>.
235  </t>
236  <t>
[1499]237    The changes in this draft are summarized in <xref target="changes.since.18"/>.
[1268]238  </t>
[949]241   </front>
242   <middle>
[540]244<section anchor="caching" title="Introduction">
[949]246   HTTP is typically used for distributed information systems, where
247   performance can be improved by the use of response caches. This document
248   defines aspects of HTTP/1.1 related to caching and reusing response
249   messages.
[540]252<section anchor="intro.purpose" title="Purpose">
253<iref item="cache" />
[949]255   An HTTP <x:dfn>cache</x:dfn> is a local store of response messages and the
256   subsystem that controls its message storage, retrieval, and deletion. A
257   cache stores cacheable responses in order to reduce the response time and
258   network bandwidth consumption on future, equivalent requests. Any client or
259   server &MAY; employ a cache, though a cache cannot be used by a server that
260   is acting as a tunnel.
[1374]263   The goal of caching in HTTP/1.1 is to significantly improve performance
264   by reusing a prior response message to satisfy a current request.
265   A stored response is considered "fresh", as defined in
266   <xref target="expiration.model" />, if the response can be reused without
267   "validation" (checking with the origin server to see if the cached response
268   remains valid for this request).  A fresh cache response can therefore
269   reduce both latency and network transfers each time it is reused.
270   When a cached response is not fresh, it might still be reusable if it can
271   be freshened by validation (<xref target="validation.model" />) or if the
272   origin is unavailable.
[540]276<section anchor="intro.terminology" title="Terminology">
[949]278   This specification uses a number of terms to refer to the roles played by
279   participants in, and objects of, HTTP caching.
[1112]282   <iref item="cache" />
283   <x:dfn>cache</x:dfn>
284   <list>
285      <t>A conformant implementation of a HTTP cache. Note that this implies
286        an HTTP/1.1 cache; this specification does not define conformance
287        for HTTP/1.0 caches.</t>
288   </list>
290<t anchor="shared.and.non-shared.caches">
291   <iref item="shared cache" />
292   <x:dfn>shared cache</x:dfn>
293   <list>
[1374]294      <t>A cache that stores responses to be reused by more than one user;
295         usually (but not always) deployed as part of an intermediary.</t>
[1112]296   </list>
299   <iref item="private cache" />
300   <x:dfn>private cache</x:dfn>
301   <list>
302      <t>A cache that is dedicated to a single user.</t>
303   </list>
[949]306   <iref item="cacheable" />
307   <x:dfn>cacheable</x:dfn>
308   <list>
309      <t>A response is cacheable if a cache is allowed to store a copy of the
310      response message for use in answering subsequent requests. Even when a
311      response is cacheable, there might be additional constraints on whether
[1112]312      a cache can use the stored copy to satisfy a particular request.</t>
[949]313   </list>
[949]316   <iref item="explicit expiration time" />
317   <x:dfn>explicit expiration time</x:dfn>
318   <list>
319      <t>The time at which the origin server intends that a representation
[969]320      no longer be returned by a cache without further validation.</t>
[949]321   </list>
[949]324   <iref item="heuristic expiration time" />
325   <x:dfn>heuristic expiration time</x:dfn>
326   <list>
327      <t>An expiration time assigned by a cache when no explicit expiration
328      time is available.</t>
329   </list>
[949]332   <iref item="age" />
333   <x:dfn>age</x:dfn>
334   <list>
335      <t>The age of a response is the time since it was sent by, or
336      successfully validated with, the origin server.</t>
337   </list>
[949]340   <iref item="first-hand" />
341   <x:dfn>first-hand</x:dfn>
342   <list>
343      <t>A response is first-hand if the freshness model is not in use; i.e.,
344      its age is 0.</t>
345   </list>
[949]348   <iref item="freshness lifetime" />
349   <x:dfn>freshness lifetime</x:dfn>
350   <list>
351      <t>The length of time between the generation of a response and its
352      expiration time.</t>
353   </list>
[949]356   <iref item="fresh" />
357   <x:dfn>fresh</x:dfn>
358   <list>
359      <t>A response is fresh if its age has not yet exceeded its freshness
360      lifetime.</t>
361   </list>
[949]364   <iref item="stale" />
365   <x:dfn>stale</x:dfn>
366   <list>
367      <t>A response is stale if its age has passed its freshness lifetime
368      (either explicit or heuristic).</t>
369   </list>
[949]372   <iref item="validator" />
373   <x:dfn>validator</x:dfn>
374   <list>
375      <t>A protocol element (e.g., an entity-tag or a Last-Modified time) that
[1112]376      is used to find out whether a stored response is an equivalent copy of
[1374]377      a representation. See &weak-and-strong;.</t>
[949]378   </list>
381   <iref item="strong validator" />
[1376]382   <iref item="validator" subitem="strong" />
[1374]383   <x:dfn>strong validator</x:dfn>
384   <list>
385      <t>A validator that is defined by the origin server such that its
386         current value will change if the representation body changes; i.e.,
387         an entity-tag that is not marked as weak (&entity-tags;) or,
388         if no entity-tag is provided, a Last-Modified value that is strong
389         in the sense defined by &lastmod-comparison;.</t>
390   </list>
[1452]394<section title="Conformance and Error Handling" anchor="intro.conformance.and.error.handling">
[847]396   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
397   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
398   document are to be interpreted as described in <xref target="RFC2119"/>.
[1452]401   This document defines conformance criteria for several roles in HTTP
402   communication, including Senders, Recipients, Clients, Servers, User-Agents,
403   Origin Servers, Intermediaries, Proxies and Gateways. See &architecture;
404   for definitions of these terms.
407   An implementation is considered conformant if it complies with all of the
408   requirements associated with its role(s). Note that SHOULD-level requirements
409   are relevant here, unless one of the documented exceptions is applicable.
412   This document also uses ABNF to define valid protocol elements
413   (<xref target="notation"/>). In addition to the prose requirements placed
414   upon them, Senders &MUST-NOT; generate protocol elements that are invalid.
417   Unless noted otherwise, Recipients &MAY; take steps to recover a usable
418   protocol element from an invalid construct. However, HTTP does not define
419   specific error handling mechanisms, except in cases where it has direct
420   impact on security. This is because different uses of the protocol require
421   different error handling strategies; for example, a Web browser may wish to
422   transparently recover from a response where the Location header field
423   doesn't parse according to the ABNF, whereby in a systems control protocol
424   using HTTP, this type of error recovery could lead to dangerous consequences.
[424]428<section title="Syntax Notation" anchor="notation">
[949]429   <x:anchor-alias value="ALPHA"/>
430   <x:anchor-alias value="CR"/>
431   <x:anchor-alias value="DIGIT"/>
432   <x:anchor-alias value="DQUOTE"/>
433   <x:anchor-alias value="LF"/>
434   <x:anchor-alias value="OCTET"/>
435   <x:anchor-alias value="SP"/>
436   <x:anchor-alias value="VCHAR"/>
[1518]438   This specification uses the Augmented Backus-Naur Form (ABNF) notation
439   of <xref target="RFC5234"/> with the list rule extension defined in
440   &notation;.  <xref target="collected.abnf"/> shows the collected ABNF
441   with the list rule expanded.
[949]444   The following core rules are included by reference, as defined in <xref
445   target="RFC5234" x:fmt="," x:sec="B.1"/>: ALPHA (letters), CR (carriage
446   return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double
447   quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit
[1425]448   sequence of data), SP (space), and VCHAR (any visible US-ASCII character).
[424]451<section title="Core Rules" anchor="core.rules">
[949]452   <x:anchor-alias value="quoted-string"/>
453   <x:anchor-alias value="token"/>
454   <x:anchor-alias value="OWS"/>
[1396]456   The core rules below are defined in <xref target="Part1"/>:
458<figure><artwork type="abnf2616">
[1518]459  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &whitespace;&gt;
460  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &field-components;&gt;
461  <x:ref>token</x:ref>         = &lt;token, defined in &field-components;&gt;
[949]465<section title="ABNF Rules defined in other Parts of the Specification"
466    anchor="abnf.dependencies">
467   <x:anchor-alias value="field-name"/>
468   <x:anchor-alias value="HTTP-date"/>
469   <x:anchor-alias value="port"/>
470   <x:anchor-alias value="pseudonym"/>
471   <x:anchor-alias value="uri-host"/>
[949]473   The ABNF rules below are defined in other parts:
[207]475<figure><!--Part1--><artwork type="abnf2616">
[647]476  <x:ref>field-name</x:ref>    = &lt;field-name, defined in &header-fields;&gt;
[1436]477  <x:ref>HTTP-date</x:ref>     = &lt;HTTP-date, defined in &http-date;&gt;
[374]478  <x:ref>port</x:ref>          = &lt;port, defined in &uri;&gt;
[229]479  <x:ref>pseudonym</x:ref>     = &lt;pseudonym, defined in &header-via;&gt;
[374]480  <x:ref>uri-host</x:ref>      = &lt;uri-host, defined in &uri;&gt;
[1323]485<section title="Delta Seconds" anchor="delta-seconds">
487   The delta-seconds rule specifies a non-negative integer, representing time
488   in seconds.
490<figure><artwork type="abnf2616"><iref item="Grammar" primary="true" subitem="delta-seconds" />
491  <x:ref>delta-seconds</x:ref>  = 1*<x:ref>DIGIT</x:ref>
494   If an implementation receives a delta-seconds value larger than the largest
495   positive integer it can represent, or if any of its subsequent calculations
496   overflows, it &MUST; consider the value to be 2147483648 (2<x:sup>31</x:sup>).
[1433]497   Recipients parsing a delta-seconds value &MUST; use an arithmetic type of
[1323]498   at least 31 bits of range, and senders &MUST-NOT; send delta-seconds with a
499   value greater than 2147483648.
[540]505<section anchor="caching.overview" title="Cache Operation">
[1374]506<iref item="cache entry" />
507<iref item="cache key" />
509   Proper cache operation preserves the semantics of HTTP transfers
510   (&semantics;) while eliminating the transfer of information already held
511   in the cache.  Although caching is an entirely &OPTIONAL; feature of HTTP,
512   we assume that reusing the cached response is desirable and that such
513   reuse is the default behavior when no requirement or locally-desired
514   configuration prevents it.  Therefore, HTTP cache requirements are focused
515   on preventing a cache from either storing a non-reusable response or
516   reusing a stored response inappropriately.
519   Each <x:dfn>cache entry</x:dfn> consists of a cache key and one or more
520   HTTP responses corresponding to prior requests that used the same key.
521   The most common form of cache entry is a successful result of a retrieval
522   request: i.e., a 200 (OK) response containing a representation of the
523   resource identified by the request target.  However, it is also possible
524   to cache negative results (e.g., 404 not found), incomplete results
525   (e.g., 206 partial content), and responses to safe methods other than
526   GET if the method's definition allows such caching and defines something
527   suitable for use as a cache key.
530   The default <x:dfn>cache key</x:dfn> consists of the request method and
531   target URI.  However, since HTTP caches in common use today are typically
532   limited to caching responses to GET, most implementations simply decline
533   other methods and use only the URI as the key.
536   If a request target is subject to content negotiation, its cache entry
537   might consist of multiple stored responses, each differentiated by a
538   secondary key for the values of the original request's selecting header
539   fields (<xref target="caching.negotiated.responses"/>).
[540]542<section anchor="response.cacheability" title="Response Cacheability">
[949]544   A cache &MUST-NOT; store a response to any request, unless:
545   <list style="symbols">
546      <t>The request method is understood by the cache and defined as being
547      cacheable, and</t>
548      <t>the response status code is understood by the cache, and</t>
549      <t>the "no-store" cache directive (see <xref
550      target="header.cache-control" />) does not appear in request or response
[994]551      header fields, and</t>
[949]552      <t>the "private" cache response directive (see <xref
[1514]553      target="cache-response-directive" />) does not appear in the response, if
[949]554      the cache is shared, and</t>
[994]555      <t>the "Authorization" header field (see &header-authorization;) does not
[949]556      appear in the request, if the cache is shared, unless the response
557      explicitly allows it (see <xref target="caching.authenticated.responses"
558      />), and</t>
559      <t>the response either:
560         <list style="symbols">
[994]561            <t>contains an Expires header field (see <xref target="header.expires"
[949]562            />), or</t>
563            <t>contains a max-age response cache directive (see <xref
564            target="cache-response-directive" />), or</t>
565            <t>contains a s-maxage response cache directive and the cache is
566            shared, or</t>
567            <t>contains a Cache Control Extension (see <xref
568            target="cache.control.extensions" />) that allows it to be cached,
569            or</t>
570            <t>has a status code that can be served with heuristic freshness
571            (see <xref target="heuristic.freshness" />).</t>
572         </list>
573      </t>
574   </list>
[1292]577   Note that any of the requirements listed above can be overridden by a
[1291]578   cache-control extension; see <xref target="cache.control.extensions" />.
[949]581   In this context, a cache has "understood" a request method or a response
[1374]582   status code if it recognizes it and implements any cache-specific
583   behavior.
[1374]586   Note that, in normal operation, most caches will not store a response that
[949]587   has neither a cache validator nor an explicit expiration time, as such
588   responses are not usually useful to store. However, caches are not
589   prohibited from storing such responses.
[1374]592   A response message is considered complete when all of the octets
593   indicated by the message framing (&messaging;) are received
594   prior to the connection being closed.
595   If the request is GET, the response status is 200 (OK), and the entire
596   response header block has been received, a cache &MAY; store an incomplete
597   response message-body if the cache entry is recorded as incomplete.
598   Likewise, a 206 (Partial Content) response &MAY; be stored as if it were
599   an incomplete 200 (OK) cache entry.  However, a cache &MUST-NOT; store
600   incomplete or partial content responses if it does not support the Range
601   and Content-Range header fields or if it does not understand the
602   range units used in those fields.
[1374]605   A cache &MAY; complete a stored incomplete response by making a subsequent
606   range request (&partial;) and combining the successful response with the
607   stored entry, as defined in <xref target="combining.responses"/>.
608   A cache &MUST-NOT; use an incomplete response to answer requests
609   unless the response has been made complete or the request is partial and
610   specifies a range that is wholly within the incomplete response.
611   A cache &MUST-NOT; send a partial response to a client without explicitly
612   marking it as such using the 206 (Partial Content) status code.
[949]617<section anchor="constructing.responses.from.caches"
618   title="Constructing Responses from Caches">
[949]620   For a presented request, a cache &MUST-NOT; return a stored response,
621   unless:
622   <list style="symbols">
[965]623      <t>The presented effective request URI (&effective-request-uri;) and
[949]624      that of the stored response match, and</t>
625      <t>the request method associated with the stored response allows it to
626      be used for the presented request, and</t>
[1163]627      <t>selecting header fields nominated by the stored response (if any)
[949]628      match those presented (see <xref target="caching.negotiated.responses"
629      />), and</t>
[1483]630      <t>the presented request does not contain the no-cache pragma (<xref
631      target="header.pragma"/>), nor the no-cache cache directive (<xref
632      target="cache-request-directive"/>), unless the stored response is
633      successfully validated (<xref target="validation.model"/>), and</t>
634      <t>the stored response does not contain the no-cache cache directive
635      (<xref target="cache-response-directive"/>), unless it is successfully
636      validated (<xref target="validation.model"/>), and</t>
[949]637      <t>the stored response is either:
638         <list style="symbols">
639            <t>fresh (see <xref target="expiration.model" />), or</t>
640            <t>allowed to be served stale (see <xref
641            target="serving.stale.responses" />), or</t>
642            <t>successfully validated (see <xref target="validation.model"
643            />).</t>
644         </list>
645      </t>
[540]646  </list>
[1292]649   Note that any of the requirements listed above can be overridden by a
[1291]650   cache-control extension; see <xref target="cache.control.extensions" />.
[949]653   When a stored response is used to satisfy a request without validation,
[1112]654   a cache &MUST; include a single Age header field (<xref target="header.age"
[949]655   />) in the response with a value equal to the stored response's
656   current_age; see <xref target="age.calculations" />.
[1112]659   A cache &MUST; write through requests with methods that are unsafe
660   (&safe-methods;) to the origin server; i.e., a cache must not generate
661   a reply to such a request before having forwarded the request and having
662   received a corresponding response.
[949]665   Also, note that unsafe requests might invalidate already stored responses;
666   see <xref target="invalidation.after.updates.or.deletions" />.
[1277]669   When more than one suitable response is stored, a cache &MUST; use the
670   most recent response (as determined by the Date header field). It can also
[949]671   forward a request with "Cache-Control: max-age=0" or "Cache-Control:
672   no-cache" to disambiguate which response to use.
[1184]675   A cache that does not have a clock available &MUST-NOT; use stored responses
[1112]676   without revalidating them on every use. A cache, especially a shared
[1044]677   cache, &SHOULD; use a mechanism, such as NTP <xref target="RFC1305"/>, to
678   synchronize its clock with a reliable external standard.
[540]683<section anchor="expiration.model" title="Freshness Model">
[949]685   When a response is "fresh" in the cache, it can be used to satisfy
686   subsequent requests without contacting the origin server, thereby improving
687   efficiency.
[949]690   The primary mechanism for determining freshness is for an origin server to
691   provide an explicit expiration time in the future, using either the Expires
[994]692   header field (<xref target="header.expires" />) or the max-age response cache
[949]693   directive (<xref target="cache-response-directive" />). Generally, origin
694   servers will assign future explicit expiration times to responses in the
695   belief that the representation is not likely to change in a semantically
696   significant way before the expiration time is reached.
[949]699   If an origin server wishes to force a cache to validate every request, it
[969]700   can assign an explicit expiration time in the past to indicate that the
[1113]701   response is already stale. Compliant caches will normally validate the
702   cached response before reusing it for subsequent requests (see <xref
703   target="serving.stale.responses" />).
[1112]706   Since origin servers do not always provide explicit expiration times,
707   a cache &MAY; assign a heuristic expiration time when an explicit time is not
708   specified, employing algorithms that use other header field values (such as the
709   Last-Modified time) to estimate a plausible expiration time. This
[949]710   specification does not provide specific algorithms, but does impose
711   worst-case constraints on their results.
[575]715  The calculation to determine if a response is fresh is:
717<artwork type="code">
[538]718   response_is_fresh = (freshness_lifetime &gt; current_age)
[949]722   The freshness_lifetime is defined in <xref
723   target="calculating.freshness.lifetime" />; the current_age is defined in
724   <xref target="age.calculations" />.
[1483]727   Additionally, clients can influence freshness calculation -- either
728   constraining it relaxing it -- by using the max-age and min-fresh
729   request cache directives. See <xref target="cache-request-directive" />
730   for details.
[949]733   Note that freshness applies only to cache operation; it cannot be used to
734   force a user agent to refresh its display or reload a resource. See <xref
735   target="history.lists" /> for an explanation of the difference between
736   caches and history mechanisms.
[949]739<section anchor="calculating.freshness.lifetime"
740   title="Calculating Freshness Lifetime">
[949]742   A cache can calculate the freshness lifetime (denoted as
743   freshness_lifetime) of a response by using the first match of:
744   <list style="symbols">
745      <t>If the cache is shared and the s-maxage response cache directive
746      (<xref target="cache-response-directive" />) is present, use its value,
747      or</t>
748      <t>If the max-age response cache directive (<xref
[540]749      target="cache-response-directive" />) is present, use its value, or</t>
[994]750      <t>If the Expires response header field (<xref target="header.expires" />) is
751      present, use its value minus the value of the Date response header field,
[949]752      or</t>
753      <t>Otherwise, no explicit expiration time is present in the response. A
754      heuristic freshness lifetime might be applicable; see <xref
755      target="heuristic.freshness" />.</t>
756   </list>
[949]759   Note that this calculation is not vulnerable to clock skew, since all of
760   the information comes from the origin server.
[540]763<section anchor="heuristic.freshness" title="Calculating Heuristic Freshness">
[949]765   If no explicit expiration time is present in a stored response that has a
766   status code whose definition allows heuristic freshness to be used
767   (including the following in &status-codes;: 200, 203, 206, 300, 301 and
[1112]768   410), a cache &MAY; calculate a heuristic expiration time. A cache &MUST-NOT;
769   use heuristics to determine freshness for responses with status codes that do
770   not explicitly allow it.
[1112]773   When a heuristic is used to calculate freshness lifetime, a cache
[994]774   &SHOULD; attach a Warning header field with a 113 warn-code to the response if
[949]775   its current_age is more than 24 hours and such a warning is not already
776   present.
[1433]779   Also, if the response has a Last-Modified header field
780   (&header-last-modified;), caches are encouraged to use a heuristic
781   expiration value that is no more than some fraction of the interval since
782   that time. A typical setting of this fraction might be 10%.
[949]785   <t>
786      <x:h>Note:</x:h> RFC 2616 (<xref target="RFC2616" x:fmt=","
787      x:sec="13.9"/>) required that caches do not calculate heuristic
[1173]788      freshness for URIs with query components (i.e., those containing '?').
[949]789      In practice, this has not been widely implemented. Therefore, servers
790      are encouraged to send explicit directives (e.g., Cache-Control:
791      no-cache) if they wish to preclude caching.
792   </t>
[540]797<section anchor="age.calculations" title="Calculating Age">
[1163]799   HTTP/1.1 uses the Age header field to convey the estimated age of the
[949]800   response message when obtained from a cache. The Age field value is the
801   cache's estimate of the amount of time since the response was generated or
802   validated by the origin server. In essence, the Age value is the sum of the
803   time that the response has been resident in each of the caches along the
804   path from the origin server, plus the amount of time it has been in transit
805   along network paths.
[949]808   The following data is used for the age calculation:
[949]811   <x:dfn>age_value</x:dfn>
812   <list>
813      <t>
[994]814         The term "age_value" denotes the value of the Age header field (<xref
[949]815         target="header.age"/>), in a form appropriate for arithmetic
816         operation; or 0, if not available.
817      </t>
818   </list>
[949]821   <x:dfn>date_value</x:dfn>
822   <list>
823      <t>
[994]824         HTTP/1.1 requires origin servers to send a Date header field, if possible,
[949]825         with every response, giving the time at which the response was
826         generated. The term "date_value" denotes the value of the Date
[994]827         header field, in a form appropriate for arithmetic operations. See
828         &header-date; for the definition of the Date header field, and for
829         requirements regarding responses without it.
[949]830      </t>
831   </list>
[949]834   <x:dfn>now</x:dfn>
835   <list>
836      <t>
837         The term "now" means "the current value of the clock at the host
[1112]838         performing the calculation". A cache &SHOULD; use NTP (<xref
839         target="RFC1305"/>) or some similar protocol to synchronize its
[949]840         clocks to a globally accurate time standard.
841      </t>
842   </list>
[949]845   <x:dfn>request_time</x:dfn>
846   <list>
847      <t>
848         The current value of the clock at the host at the time the request
849         resulting in the stored response was made.
850      </t>
851   </list>
[949]854   <x:dfn>response_time</x:dfn>
855   <list>
856      <t>
857         The current value of the clock at the host at the time the response
858         was received.
859      </t>
860   </list>
[949]863   A response's age can be calculated in two entirely independent ways:
864   <list style="numbers">
865      <t>the "apparent_age": response_time minus date_value, if the local
866      clock is reasonably well synchronized to the origin server's clock. If
867      the result is negative, the result is replaced by zero.</t>
868      <t>the "corrected_age_value", if all of the caches along the response
[1112]869      path implement HTTP/1.1. A cache &MUST; interpret this value relative
[949]870      to the time the request was initiated, not the time that the response
871      was received.</t>
872   </list>
875<artwork type="code">
[786]876  apparent_age = max(0, response_time - date_value);
[786]878  response_delay = response_time - request_time;
[792]879  corrected_age_value = age_value + response_delay; 
[1484]883<preamble>These &SHOULD; be combined as</preamble>
[792]884<artwork type="code">
885  corrected_initial_age = max(apparent_age, corrected_age_value);
[1484]888   unless the cache is confident in the value of the Age header (e.g., because
889   there are no HTTP/1.0 hops in the Via header), in which case the
890   corrected_age_value &MAY; be used as the corrected_initial_age.</t>
[949]892   The current_age of a stored response can then be calculated by adding the
893   amount of time (in seconds) since the stored response was last validated by
894   the origin server to the corrected_initial_age.
[786]896<figure><artwork type="code">
[540]897  resident_time = now - response_time;
[786]898  current_age = corrected_initial_age + resident_time;
[1418]901   Additionally, to avoid common problems in date parsing:
904  <list style="symbols">
905     <t>HTTP/1.1 clients and caches &SHOULD; assume that an RFC-850 date
906        which appears to be more than 50 years in the future is in fact
907        in the past (this helps solve the "year 2000" problem).</t>
909     <t>Although all date formats are specified to be case-sensitive,
910        recipients &SHOULD; match day, week and timezone names
911        case-insensitively.</t>
913     <t>An HTTP/1.1 implementation &MAY; internally represent a parsed
914        Expires date as earlier than the proper value, but &MUST-NOT;
915        internally represent a parsed Expires date as later than the
916        proper value.</t>
918     <t>All expiration-related calculations &MUST; be done in GMT. The
919        local time zone &MUST-NOT; influence the calculation or comparison
920        of an age or expiration time.</t>
922     <t>If an HTTP header field incorrectly carries a date value with a time
923        zone other than GMT, it &MUST; be converted into GMT using the
924        most conservative possible conversion.</t>
925  </list>
[540]929<section anchor="serving.stale.responses" title="Serving Stale Responses">
[949]931   A "stale" response is one that either has explicit expiry information or is
932   allowed to have heuristic expiry calculated, but is not fresh according to
933   the calculations in <xref target="expiration.model" />.
[1112]936   A cache &MUST-NOT; return a stale response if it is prohibited by an
[949]937   explicit in-protocol directive (e.g., by a "no-store" or "no-cache" cache
938   directive, a "must-revalidate" cache-response-directive, or an applicable
939   "s-maxage" or "proxy-revalidate" cache-response-directive; see <xref
940   target="cache-response-directive"/>).
[1433]943   A cache &MUST-NOT; return stale responses unless it is disconnected
[949]944   (i.e., it cannot contact the origin server or otherwise find a forward
[1264]945   path) or doing so is explicitly allowed (e.g., by the max-stale request
[949]946   directive; see <xref target="cache-request-directive" />).
[1112]949   A cache &SHOULD; append a Warning header field with the 110 warn-code (see
950   <xref target="header.warning" />) to stale responses. Likewise, a cache
951   &SHOULD; add the 112 warn-code to stale responses if the cache is
952   disconnected.
[949]955   If a cache receives a first-hand response (either an entire response, or a
956   304 (Not Modified) response) that it would normally forward to the
957   requesting client, and the received response is no longer fresh, the cache
[1433]958   can forward it to the requesting client without adding a new Warning (but
959   without removing any existing Warning header fields). A cache shouldn't
[949]960   attempt to validate a response simply because that response became stale in
961   transit.
[540]966<section anchor="validation.model" title="Validation Model">
[949]968   When a cache has one or more stored responses for a requested URI, but
969   cannot serve any of them (e.g., because they are not fresh, or one cannot
970   be selected; see <xref target="caching.negotiated.responses"/>), it can use
971   the conditional request mechanism &conditional; in the forwarded request to
972   give the origin server an opportunity to both select a valid stored
973   response to be used, and to update it. This process is known as
974   "validating" or "revalidating" the stored response.
[1433]977   When sending such a conditional request, a cache adds an If-Modified-Since
978   header field whose value is that of the Last-Modified header field from the
979   selected (see <xref target="caching.negotiated.responses"/>) stored
980   response, if available.
[1433]983   Additionally, a cache can add an If-None-Match header field whose value is
984   that of the ETag header field(s) from all responses stored for the
985   requested URI, if present. However, if any of the stored responses contains
986   only partial content, the cache shouldn't include its entity-tag in the
987   If-None-Match header field unless the request is for a range that would be
988   fully satisfied by that stored response.
991<t>Cache handling of a response to a conditional request is dependent upon its status code:</t>
[1419]994   <list style="symbols">
995      <t>
996         A 304 (Not Modified) response status code indicates that the stored
997         response can be updated and reused; see <xref
998         target="freshening.responses"/>.
999      </t>
1000      <t>
1001         A full response (i.e., one with a response body) indicates that none
1002         of the stored responses nominated in the conditional request is
[1433]1003         suitable. Instead, the cache can use the full response to
1004         satisfy the request and &MAY; replace the stored response(s).
[1419]1005      </t>
1006      <t>
1007         However, if a cache receives a 5xx response while attempting to
[1433]1008         validate a response, it can either forward this response to the
[1419]1009         requesting client, or act as if the server failed to respond. In the
[1433]1010         latter case, it can return a previously stored response (see <xref
[1419]1011         target="serving.stale.responses" />).
1012      </t>
1013   </list>
1016<section anchor="freshening.responses" title="Freshening Responses">
[1419]1018   When a cache receives a 304 (Not Modified) response and already has one
1019   or more stored 200 (OK) responses for the same cache key, the cache needs
1020   to identify which of the stored responses are updated by this new response
1021   and then update the stored response(s) with the new information provided in
1022   the 304 response.
1023   <list style="symbols">
1024    <t>
1025     If the new response contains a strong validator, then that strong
1026     validator identifies the selected representation.  All of the stored
1027     responses with the same strong validator are selected.
1028     If none of the stored responses contain the same strong validator, then
1029     this new response corresponds to a new selected representation and
1030     &MUST-NOT; update the existing stored responses.
1031    </t>
1032    <t>
1033     If the new response contains a weak validator and that validator
1034     corresponds to one of the cache's stored responses, then the most
1035     recent of those matching stored responses is selected.
1036    </t>
1037    <t>
1038     If the new response does not include any form of validator, there is
1039     only one stored response, and that stored response also lacks a
1040     validator, then that stored response is selected.
1041    </t>
1042   </list>
[1419]1045   If a stored response is selected for update, the cache &MUST;:
1046   <list style="symbols">
1047      <t>delete any Warning header fields in the stored response with
1048         warn-code 1xx (see <xref target="header.warning" />);</t>
1049      <t>retain any Warning header fields in the stored response with
1050         warn-code 2xx; and,</t>
1051      <t>use other header fields provided in the 304 response to replace
1052         all instances of the corresponding header fields in the stored
1053         response.</t>
1054   </list>
[949]1060<section anchor="invalidation.after.updates.or.deletions"
1061   title="Request Methods that Invalidate">
[1290]1063   Because unsafe request methods (&safe-methods;) such as PUT, POST or DELETE
1064   have the potential for changing state on the origin server, intervening
1065   caches can use them to keep their contents up-to-date.
[1112]1068   A cache &MUST; invalidate the effective Request URI
1069   (&effective-request-uri;) as well as the URI(s) in the Location
[1314]1070   and Content-Location header fields (if present) when a non-error
1071   response to a request with an unsafe method is received.
[1112]1074   However, a cache &MUST-NOT; invalidate a URI from a
1075   Location or Content-Location header field if the host part of that URI
1076   differs from the host part in the effective request URI
1077   (&effective-request-uri;). This helps prevent denial of service attacks.
[1433]1080   A cache &MUST; invalidate the effective request URI
[1314]1081   (&effective-request-uri;) when it receives a non-error response
1082   to a request with a method whose safety is unknown.
[1314]1085   Here, a "non-error response" is one with a 2xx or 3xx status code.
1086   "Invalidate" means that the cache will either remove all stored
[965]1087   responses related to the effective request URI, or will mark these as
[949]1088   "invalid" and in need of a mandatory validation before they can be returned
1089   in response to a subsequent request.
[949]1092   Note that this does not guarantee that all appropriate responses are
1093   invalidated. For example, the request that caused the change at the origin
1094   server might not have gone through the cache where a response is stored.
[949]1098<section anchor="caching.authenticated.responses"
1099   title="Shared Caching of Authenticated Responses">
[1112]1102   A shared cache &MUST-NOT; use a cached response to a request with an
[994]1103   Authorization header field (&header-authorization;) to satisfy any subsequent
[949]1104   request unless a cache directive that allows such responses to be stored is
1105   present in the response.
1109   In this specification, the following Cache-Control response directives
1110   (<xref target="cache-response-directive"/>) have such an effect:
1111   must-revalidate, public, s-maxage.
1115   Note that cached responses that contain the "must-revalidate" and/or
1116   "s-maxage" response directives are not allowed to be served stale (<xref
1117   target="serving.stale.responses"/>) by shared caches. In particular, a
1118   response with either "max-age=0, must-revalidate" or "s-maxage=0" cannot be
1119   used to satisfy a subsequent request without revalidating it on the origin
1120   server.
[949]1124<section anchor="caching.negotiated.responses"
1125   title="Caching Negotiated Responses">
[949]1127   When a cache receives a request that can be satisfied by a stored response
1128   that has a Vary header field (<xref target="header.vary"/>), it &MUST-NOT;
[1163]1129   use that response unless all of the selecting header fields nominated by
[994]1130   the Vary header field match in both the original request (i.e., that associated
[949]1131   with the stored response), and the presented request.
[1163]1134   The selecting header fields from two requests are defined to match if and
[949]1135   only if those in the first request can be transformed to those in the
1136   second request by applying any of the following:
1137   <list style="symbols">
1138      <t>
[994]1139         adding or removing whitespace, where allowed in the header field's syntax
[949]1140      </t>
1141      <t>
[1163]1142         combining multiple header fields with the same field name
[949]1143         (see &header-fields;)
1144      </t>
1145      <t>
[994]1146         normalizing both header field values in a way that is known to have
1147         identical semantics, according to the header field's specification (e.g.,
[949]1148         re-ordering field values when order is not significant;
1149         case-normalization, where values are defined to be case-insensitive)
1150      </t>
[771]1151  </list>
[949]1154   If (after any normalization that might take place) a header field is absent
1155   from a request, it can only match another request if it is also absent
1156   there.
[949]1159   A Vary header field-value of "*" always fails to match, and subsequent
1160   requests to that resource can only be properly interpreted by the origin
1161   server.
[1163]1164   The stored response with matching selecting header fields is known as the
[949]1165   selected response.
[1292]1168   If multiple selected responses are available, the most recent response
1169   (as determined by the Date header field) is used; see <xref
1170   target="constructing.responses.from.caches"/>.
[1433]1173   If no selected response is available, the cache can forward the presented
[949]1174   request to the origin server in a conditional request; see <xref
1175   target="validation.model"/>.
[1374]1179<section anchor="combining.responses" title="Combining Partial Content">
[1374]1181   A response might transfer only a partial representation if the
1182   connection closed prematurely or if the request used one or more Range
1183   specifiers (&partial;).  After several such transfers, a cache might have
1184   received several ranges of the same representation.  A cache &MAY; combine
1185   these ranges into a single stored response, and reuse that response to
1186   satisfy later requests, if they all share the same strong validator and
1187   the cache complies with the client requirements in &combining-byte-ranges;.
[1374]1190   When combining the new response with one or more stored responses, a
1191   cache &MUST;:
1192   <list style="symbols">
1193      <t>delete any Warning header fields in the stored response with
1194         warn-code 1xx (see <xref target="header.warning" />);</t>
1195      <t>retain any Warning header fields in the stored response with
1196         warn-code 2xx; and,</t>
1197      <t>use other header fields provided in the new response, aside
1198         from Content-Range, to replace all instances of the corresponding
1199         header fields in the stored response.</t>
1200   </list>
[1415]1207<section anchor="header.field.definitions" title="Header Field Definitions">
[949]1209   This section defines the syntax and semantics of HTTP/1.1 header fields
1210   related to caching.
[540]1213<section anchor="header.age" title="Age">
[1120]1214   <iref item="Age header field" primary="true" x:for-anchor="" />
1215   <iref item="Header Fields" primary="true" subitem="Age" x:for-anchor="" />
[949]1216   <x:anchor-alias value="Age"/>
1217   <x:anchor-alias value="age-value"/>
[1163]1219   The "Age" header field conveys the sender's estimate of the amount
[949]1220   of time since the response was generated or successfully validated at the
1221   origin server. Age values are calculated as specified in <xref
1222   target="age.calculations" />.
[1231]1224<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Age"/>
1225  <x:ref>Age</x:ref> = <x:ref>delta-seconds</x:ref>
[1323]1228  Age field-values are non-negative integers, representing time in seconds
1229  (see <xref target="delta-seconds"/>).
[949]1232   The presence of an Age header field in a response implies that a response
1233   is not first-hand. However, the converse is not true, since HTTP/1.0 caches
1234   might not implement the Age header field.
[540]1238<section anchor="header.cache-control" title="Cache-Control">
[1120]1239   <iref item="Cache-Control header field" primary="true" x:for-anchor="" />
1240   <iref item="Header Fields" primary="true" subitem="Cache-Control"
[949]1241      x:for-anchor="" />
1242   <x:anchor-alias value="Cache-Control"/>
1243   <x:anchor-alias value="cache-directive"/>
1244   <x:anchor-alias value="cache-extension"/>
1245   <x:anchor-alias value="cache-request-directive"/>
1246   <x:anchor-alias value="cache-response-directive"/>
[1163]1248   The "Cache-Control" header field is used to specify directives for
[949]1249   caches along the request/response chain. Such cache directives are
1250   unidirectional in that the presence of a directive in a request does not
1251   imply that the same directive is to be given in the response.
[1112]1254   A cache &MUST; obey the requirements of the Cache-Control
[949]1255   directives defined in this section. See <xref
1256   target="cache.control.extensions"/> for information about how Cache-Control
1257   directives defined elsewhere are handled.
[949]1260   <t>
1261       <x:h>Note:</x:h> HTTP/1.0 caches might not implement Cache-Control and
1262       might only implement Pragma: no-cache (see <xref target="header.pragma"
1263       />).
1264   </t>
[1173]1267   A proxy, whether or not it implements a cache, &MUST; pass cache directives
1268   through in forwarded messages, regardless of their
[1112]1269   significance to that application, since the directives might be applicable
1270   to all recipients along the request/response chain. It is not possible to
1271   target a directive to a specific cache.
[1449]1273<t>Cache directives are identified by a token, to be compared case-insensitively, and have an optional argument.</t>
[1231]1274<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Cache-Control"/><iref primary="true" item="Grammar" subitem="cache-extension"/>
1275  <x:ref>Cache-Control</x:ref>   = 1#<x:ref>cache-directive</x:ref>
[229]1277  <x:ref>cache-directive</x:ref> = <x:ref>cache-request-directive</x:ref>
[334]1278     / <x:ref>cache-response-directive</x:ref>
[334]1280  <x:ref>cache-extension</x:ref> = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
[949]1283<section anchor="cache-request-directive"
1284   title="Request Cache-Control Directives">
1285   <x:anchor-alias value="cache-request-directive" />
[949]1287<figure><artwork type="abnf2616"><iref item="Grammar" primary="true"
1288   subitem="cache-request-directive" />
[538]1289  <x:ref>cache-request-directive</x:ref> =
1290       "no-cache"
1291     / "no-store"
1292     / "max-age" "=" <x:ref>delta-seconds</x:ref>
1293     / "max-stale" [ "=" <x:ref>delta-seconds</x:ref> ]
1294     / "min-fresh" "=" <x:ref>delta-seconds</x:ref>
1295     / "no-transform"
1296     / "only-if-cached"
1297     / <x:ref>cache-extension</x:ref>
[949]1301   <x:dfn>no-cache</x:dfn>
1302   <iref item="Cache Directives" primary="true" subitem="no-cache" />
1303   <iref item="no-cache" primary="true" subitem="Cache Directive" />
1304   <list>
[1112]1305      <t>The no-cache request directive indicates that a cache &MUST-NOT;
1306      use a stored response to satisfy the request without successful
1307      validation on the origin server.</t>
[949]1308   </list>
[949]1311   <x:dfn>no-store</x:dfn>
1312   <iref item="Cache Directives" primary="true" subitem="no-store" />
1313   <iref item="no-store" primary="true" subitem="Cache Directive" />
1314   <list>
1315      <t>The no-store request directive indicates that a cache &MUST-NOT;
1316      store any part of either this request or any response to it. This
[1112]1317      directive applies to both private and shared caches. "&MUST-NOT;
[949]1318      store" in this context means that the cache &MUST-NOT; intentionally
1319      store the information in non-volatile storage, and &MUST; make a
1320      best-effort attempt to remove the information from volatile storage as
1321      promptly as possible after forwarding it.</t>
1322      <t>This directive is NOT a reliable or sufficient mechanism for ensuring
1323      privacy. In particular, malicious or compromised caches might not
1324      recognize or obey this directive, and communications networks might be
1325      vulnerable to eavesdropping.</t>
[1110]1326      <t>Note that if a request containing this directive is satisfied from a
1327      cache, the no-store request directive does not apply to the already
1328      stored response.</t>
[949]1329   </list>
[949]1332   <x:dfn>max-age</x:dfn>
1333   <iref item="Cache Directives" primary="true" subitem="max-age" />
1334   <iref item="max-age" primary="true" subitem="Cache Directive" />
1335   <list>
[1273]1336      <t>The max-age request directive indicates that the client is unwilling to
1337      accept a response whose age is greater than the specified number of
[949]1338      seconds. Unless the max-stale request directive is also present, the
1339      client is not willing to accept a stale response.</t>
1340   </list>
[949]1343   <x:dfn>max-stale</x:dfn>
1344   <iref item="Cache Directives" primary="true" subitem="max-stale" />
1345   <iref item="max-stale" primary="true" subitem="Cache Directive" />
1346   <list>
1347      <t>The max-stale request directive indicates that the client is willing
1348      to accept a response that has exceeded its expiration time. If max-stale
1349      is assigned a value, then the client is willing to accept a response
1350      that has exceeded its expiration time by no more than the specified
1351      number of seconds. If no value is assigned to max-stale, then the client
1352      is willing to accept a stale response of any age.</t>
1353   </list>
[949]1356   <x:dfn>min-fresh</x:dfn>
1357   <iref item="Cache Directives" primary="true" subitem="min-fresh" />
1358   <iref item="min-fresh" primary="true" subitem="Cache Directive" />
1359   <list>
1360      <t>The min-fresh request directive indicates that the client is willing
1361      to accept a response whose freshness lifetime is no less than its
1362      current age plus the specified time in seconds. That is, the client
1363      wants a response that will still be fresh for at least the specified
1364      number of seconds.</t>
1365   </list>
[949]1368   <x:dfn>no-transform</x:dfn>
1369   <iref item="Cache Directives" primary="true" subitem="no-transform" />
1370   <iref item="no-transform" primary="true" subitem="Cache Directive" />
1371   <list>
[1112]1372      <t>The no-transform request directive indicates that an intermediary
1373        (whether or not it implements a cache) &MUST-NOT; change the
1374        Content-Encoding, Content-Range or Content-Type request header fields,
1375        nor the request representation.</t>
[949]1376   </list>
[949]1379   <x:dfn>only-if-cached</x:dfn>
1380   <iref item="Cache Directives" primary="true" subitem="only-if-cached" />
1381   <iref item="only-if-cached" primary="true" subitem="Cache Directive" />
1382   <list>
1383      <t>The only-if-cached request directive indicates that the client only
[1278]1384      wishes to obtain a stored response. If it receives this directive, a
[949]1385      cache &SHOULD; either respond using a stored response that is consistent
1386      with the other constraints of the request, or respond with a 504
1387      (Gateway Timeout) status code. If a group of caches is being operated as
[1112]1388      a unified system with good internal connectivity, a member cache &MAY;
1389      forward such a request within that group of caches.</t>
[949]1390   </list>
[949]1394<section anchor="cache-response-directive"
1395   title="Response Cache-Control Directives">
1396   <x:anchor-alias value="cache-response-directive" />
[949]1398<figure><artwork type="abnf2616"><iref item="Grammar" primary="true"
1399   subitem="cache-response-directive" />
[538]1400  <x:ref>cache-response-directive</x:ref> =
1401       "public"
1402     / "private" [ "=" <x:ref>DQUOTE</x:ref> 1#<x:ref>field-name</x:ref> <x:ref>DQUOTE</x:ref> ]
1403     / "no-cache" [ "=" <x:ref>DQUOTE</x:ref> 1#<x:ref>field-name</x:ref> <x:ref>DQUOTE</x:ref> ]
1404     / "no-store"
1405     / "no-transform"
1406     / "must-revalidate"
1407     / "proxy-revalidate"
1408     / "max-age" "=" <x:ref>delta-seconds</x:ref>
1409     / "s-maxage" "=" <x:ref>delta-seconds</x:ref>
1410     / <x:ref>cache-extension</x:ref>
[949]1414   <x:dfn>public</x:dfn>
1415   <iref item="Cache Directives" primary="true" subitem="public" />
1416   <iref item="public" primary="true" subitem="Cache Directive" />
1417   <list>
[1129]1418      <t>The public response directive indicates that a response whose
1419        associated request contains an 'Authentication' header &MAY; be
1420        stored (see <xref target="caching.authenticated.responses" />).</t>
[540]1421  </list>
[949]1424   <x:dfn>private</x:dfn>
1425   <iref item="Cache Directives" primary="true" subitem="private" />
1426   <iref item="private" primary="true" subitem="Cache Directive" />
1427   <list>
1428      <t>The private response directive indicates that the response message is
1429      intended for a single user and &MUST-NOT; be stored by a shared cache. A
[1112]1430      private cache &MAY; store the response.</t>
[949]1431      <t>If the private response directive specifies one or more field-names,
1432      this requirement is limited to the field-values associated with the
[1112]1433      listed response header fields. That is, a shared cache &MUST-NOT; store
1434      the specified field-names(s), whereas it &MAY; store the remainder of the
1435      response message.</t>
[949]1436      <t> <x:h>Note:</x:h> This usage of the word private only controls where
1437      the response can be stored; it cannot ensure the privacy of the message
1438      content. Also, private response directives with field-names are often
1439      handled by implementations as if an unqualified private directive was
1440      received; i.e., the special handling for the qualified form is not
1441      widely implemented.</t>
1442   </list>
[949]1445   <x:dfn>no-cache</x:dfn>
1446   <iref item="Cache Directives" primary="true" subitem="no-cache" />
1447   <iref item="no-cache" primary="true" subitem="Cache Directive" />
1448   <list>
1449      <t>The no-cache response directive indicates that the response MUST NOT
1450      be used to satisfy a subsequent request without successful validation on
1451      the origin server. This allows an origin server to prevent a cache from
1452      using it to satisfy a request without contacting it, even by caches that
1453      have been configured to return stale responses.</t>
1454      <t>If the no-cache response directive specifies one or more field-names,
1455      this requirement is limited to the field-values associated with the
[1112]1456      listed response header fields. That is, a cache &MUST-NOT; send the
1457      specified field-name(s) in the response to a subsequent request without successful
[949]1458      validation on the origin server. This allows an origin server to prevent
1459      the re-use of certain header fields in a response, while still allowing
1460      caching of the rest of the response.</t>
1461      <t> <x:h>Note:</x:h> Most HTTP/1.0 caches will not recognize or obey
1462      this directive. Also, no-cache response directives with field-names are
1463      often handled by implementations as if an unqualified no-cache directive
1464      was received; i.e., the special handling for the qualified form is not
1465      widely implemented. </t>
1466   </list>
[949]1469   <x:dfn>no-store</x:dfn>
1470   <iref item="Cache Directives" primary="true" subitem="no-store" />
1471   <iref item="no-store" primary="true" subitem="Cache Directive" />
1472   <list>
1473      <t>The no-store response directive indicates that a cache &MUST-NOT;
1474      store any part of either the immediate request or response. This
[1112]1475      directive applies to both private and shared caches. "&MUST-NOT;
[949]1476      store" in this context means that the cache &MUST-NOT; intentionally
1477      store the information in non-volatile storage, and &MUST; make a
1478      best-effort attempt to remove the information from volatile storage as
1479      promptly as possible after forwarding it.</t>
1480      <t>This directive is NOT a reliable or sufficient mechanism for ensuring
1481      privacy. In particular, malicious or compromised caches might not
1482      recognize or obey this directive, and communications networks might be
1483      vulnerable to eavesdropping.</t>
1484   </list>
[949]1487   <x:dfn>must-revalidate</x:dfn>
1488   <iref item="Cache Directives" primary="true" subitem="must-revalidate" />
1489   <iref item="must-revalidate" primary="true" subitem="Cache Directive" />
1490   <list>
1491      <t>The must-revalidate response directive indicates that once it has
[1112]1492      become stale, a cache &MUST-NOT; use the response to satisfy subsequent
[949]1493      requests without successful validation on the origin server.</t>
1494      <t>The must-revalidate directive is necessary to support reliable
[1112]1495      operation for certain protocol features. In all circumstances a
1496      cache &MUST; obey the must-revalidate directive; in particular,
1497      if a cache cannot reach the origin server for any reason, it &MUST;
[949]1498      generate a 504 (Gateway Timeout) response.</t>
[1433]1499      <t>The must-revalidate directive ought to be used by servers if and only
1500      if failure to validate a request on the representation could result in
[949]1501      incorrect operation, such as a silently unexecuted financial
1502      transaction.</t>
1503   </list>
[949]1506   <x:dfn>proxy-revalidate</x:dfn>
1507   <iref item="Cache Directives" primary="true" subitem="proxy-revalidate" />
1508   <iref item="proxy-revalidate" primary="true" subitem="Cache Directive" />
1509   <list>
1510      <t>The proxy-revalidate response directive has the same meaning as the
1511      must-revalidate response directive, except that it does not apply to
[1112]1512      private caches.</t>
[949]1513   </list>
[949]1516   <x:dfn>max-age</x:dfn>
1517   <iref item="Cache Directives" primary="true" subitem="max-age" />
1518   <iref item="max-age" primary="true" subitem="Cache Directive" />
1519   <list>
[1270]1520      <t>The max-age response directive indicates that the response is to be
[949]1521      considered stale after its age is greater than the specified number of
1522      seconds.</t>
1523   </list>
[949]1526   <x:dfn>s-maxage</x:dfn>
1527   <iref item="Cache Directives" primary="true" subitem="s-maxage" />
1528   <iref item="s-maxage" primary="true" subitem="Cache Directive" />
1529   <list>
1530      <t>The s-maxage response directive indicates that, in shared caches, the
1531      maximum age specified by this directive overrides the maximum age
[994]1532      specified by either the max-age directive or the Expires header field. The
[949]1533      s-maxage directive also implies the semantics of the proxy-revalidate
1534      response directive.</t>
1535   </list>
[949]1538   <x:dfn>no-transform</x:dfn>
1539   <iref item="Cache Directives" primary="true" subitem="no-transform" />
1540   <iref item="no-transform" primary="true" subitem="Cache Directive" />
1541   <list>
[1112]1542      <t>The no-transform response directive indicates that an intermediary
1543      (regardless of whether it implements a cache) &MUST-NOT; change the
1544      Content-Encoding, Content-Range or Content-Type response header fields,
1545      nor the response representation.</t>
[949]1546   </list>
[540]1551<section anchor="cache.control.extensions" title="Cache Control Extensions">
[949]1553   The Cache-Control header field can be extended through the use of one or
1554   more cache-extension tokens, each with an optional value. Informational
1555   extensions (those that do not require a change in cache behavior) can be
1556   added without changing the semantics of other directives. Behavioral
1557   extensions are designed to work by acting as modifiers to the existing base
1558   of cache directives. Both the new directive and the standard directive are
1559   supplied, such that applications that do not understand the new directive
1560   will default to the behavior specified by the standard directive, and those
1561   that understand the new directive will recognize it as modifying the
1562   requirements associated with the standard directive. In this way,
1563   extensions to the cache-control directives can be made without requiring
1564   changes to the base protocol.
[949]1567   This extension mechanism depends on an HTTP cache obeying all of the
1568   cache-control directives defined for its native HTTP-version, obeying
1569   certain extensions, and ignoring all directives that it does not
1570   understand.
[949]1573   For example, consider a hypothetical new response directive called
1574   "community" that acts as a modifier to the private directive. We define
[1112]1575   this new directive to mean that, in addition to any private cache, any
[949]1576   cache that is shared only by members of the community named within its
1577   value may cache the response. An origin server wishing to allow the UCI
1578   community to use an otherwise private response in their shared cache(s)
1579   could do so by including
1581<figure><artwork type="example">
[458]1582  Cache-Control: private, community="UCI"
[949]1585   A cache seeing this header field will act correctly even if the cache does
1586   not understand the community cache-extension, since it will also see and
1587   understand the private directive and thus default to the safe behavior.
[1285]1590   A cache &MUST; ignore unrecognized cache directives; it is assumed that any
[949]1591   cache directive likely to be unrecognized by an HTTP/1.1 cache will be
1592   combined with standard directives (or the response's default cacheability)
1593   such that the cache behavior will remain minimally correct even if the
1594   cache does not understand the extension(s).
[949]1597   The HTTP Cache Directive Registry defines the name space for the cache
1598   directives.
[1112]1601   A registration &MUST; include the following fields:
[949]1602   <list style="symbols">
1603      <t>Cache Directive Name</t>
1604      <t>Pointer to specification text</t>
1605   </list>
[949]1608   Values to be added to this name space are subject to IETF review (<xref
1609   target="RFC5226" x:fmt="," x:sec="4.1"/>).
[949]1612   The registry itself is maintained at <eref
1613   target=""/>.
[540]1619<section anchor="header.expires" title="Expires">
[1120]1620   <iref item="Expires header field" primary="true" x:for-anchor="" />
1621   <iref item="Header Fields" primary="true" subitem="Expires" x:for-anchor="" />
[949]1622   <x:anchor-alias value="Expires"/>
[965]1624   The "Expires" header field gives the date/time after which the
[949]1625   response is considered stale. See <xref target="expiration.model" /> for
1626   further discussion of the freshness model.
[949]1629   The presence of an Expires field does not imply that the original resource
1630   will change or cease to exist at, before, or after that time.
[949]1633   The field-value is an absolute date and time as defined by HTTP-date in
[1436]1634   &http-date;; a sender &MUST; use the rfc1123-date format.
[1231]1636<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/>
1637  <x:ref>Expires</x:ref> = <x:ref>HTTP-date</x:ref>
1640  <preamble>For example</preamble>
1641<artwork type="example">
[364]1642  Expires: Thu, 01 Dec 1994 16:00:00 GMT
1645   A cache &MUST; treat other invalid date formats,
1646   especially including the value "0", as in the past (i.e., "already
1647   expired").
[949]1650   <t>
1651       <x:h>Note:</x:h> If a response includes a Cache-Control field with the
1652       max-age directive (see <xref target="cache-response-directive" />),
1653       that directive overrides the Expires field. Likewise, the s-maxage
1654       directive overrides Expires in shared caches.
1655   </t>
[1400]1658   Historically, HTTP required the Expires field-value to be no more than a
1659   year in the future. While longer freshness lifetimes are no longer
1660   prohibited, extremely large values have been demonstrated to cause
1661   problems (e.g., clock overflows due to use of 32-bit integers for
1662   time values), and most caches will evict a response far sooner than
1663   that. Therefore, senders ought not produce them.
1666   An origin server without a clock &MUST-NOT; assign Expires
1667   values to a response unless these values were associated
1668   with the resource by a system or user with a reliable clock. It &MAY;
1669   assign an Expires value that is known, at or before server
1670   configuration time, to be in the past (this allows "pre-expiration"
1671   of responses without storing separate Expires values for each
1672   resource).
[540]1676<section anchor="header.pragma" title="Pragma">
[1120]1677   <iref item="Pragma header field" primary="true" x:for-anchor="" />
1678   <iref item="Header Fields" primary="true" subitem="Pragma" x:for-anchor="" />
[949]1679   <x:anchor-alias value="extension-pragma"/>
1680   <x:anchor-alias value="Pragma"/>
1681   <x:anchor-alias value="pragma-directive"/>
[1287]1683   The "Pragma" header field allows backwards compatibility with HTTP/1.0
[1284]1684   caches, so that clients can specify a "no-cache" request that they will
1685   understand (as Cache-Control was not defined until HTTP/1.1). When the
1686   Cache-Control header is also present and understood in a request, Pragma is
1687   ignored.
[1287]1690   In HTTP/1.0, Pragma was defined as an extensible field for
[1284]1691   implementation-specified directives for recipients. This specification
1692   deprecates such extensions to improve interoperability.
[1231]1694<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Pragma"/><iref primary="true" item="Grammar" subitem="pragma-directive"/><iref primary="true" item="Grammar" subitem="extension-pragma"/>
1695  <x:ref>Pragma</x:ref>           = 1#<x:ref>pragma-directive</x:ref>
1696  <x:ref>pragma-directive</x:ref> = "no-cache" / <x:ref>extension-pragma</x:ref>
1697  <x:ref>extension-pragma</x:ref> = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
[1287]1700   When the Cache-Control header is not present in a request, the no-cache
[1284]1701   request pragma-directive &MUST; have the same effect on caches as if
1702   "Cache-Control: no-cache" were present (see <xref
1703   target="cache-request-directive" />).
[1433]1706   When sending a no-cache request, a client ought to include both the pragma
1707   and cache-control directives, unless Cache-Control: no-cache is
1708   purposefully omitted to target other Cache-Control response directives at
1709   HTTP/1.1 caches. For example:
[1287]1712<artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
[1284]1713GET / HTTP/1.1
1715Cache-Control: max-age=30
1716Pragma: no-cache
1721   will constrain HTTP/1.1 caches to serve a response no older than 30
1722   seconds, while precluding implementations that do not understand
1723   Cache-Control from serving a cached response.
[949]1726   <t>
[1287]1727      <x:h>Note:</x:h> Because the meaning of "Pragma: no-cache" in responses is not
[1284]1728      specified, it does not provide a reliable replacement for
1729      "Cache-Control: no-cache" in them.
[1287]1730   </t>
[540]1734<section anchor="header.vary" title="Vary">
[1120]1735   <iref item="Vary header field" primary="true" x:for-anchor="" />
1736   <iref item="Header Fields" primary="true" subitem="Vary" x:for-anchor="" />
[949]1737   <x:anchor-alias value="Vary"/>
[1163]1739   The "Vary" header field conveys the set of header fields
[949]1740   that were used to select the representation.
[949]1743   Caches use this information, in part, to determine whether a stored
1744   response can be used to satisfy a given request; see <xref
1745   target="caching.negotiated.responses" />. determines, while the response is
1746   fresh, whether a cache is permitted to use the response to reply to a
1747   subsequent request without validation; see <xref
1748   target="caching.negotiated.responses" />.
[949]1751   In uncacheable or stale responses, the Vary field value advises the user
1752   agent about the criteria that were used to select the representation.
[1231]1754<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Vary"/>
1755  <x:ref>Vary</x:ref> = "*" / 1#<x:ref>field-name</x:ref>
[949]1758   The set of header fields named by the Vary field value is known as the
[1163]1759   selecting header fields.
[1112]1762   A server &SHOULD; include a Vary header field with any cacheable response
[949]1763   that is subject to server-driven negotiation. Doing so allows a cache to
1764   properly interpret future requests on that resource and informs the user
1765   agent about the presence of negotiation on that resource. A server &MAY;
1766   include a Vary header field with a non-cacheable response that is subject
1767   to server-driven negotiation, since this might provide the user agent with
1768   useful information about the dimensions over which the response varies at
1769   the time of the response.
[949]1772   A Vary field value of "*" signals that unspecified parameters not limited
[1163]1773   to the header fields (e.g., the network address of the client), play a
[949]1774   role in the selection of the response representation; therefore, a cache
[1112]1775   cannot determine whether this response is appropriate. A proxy &MUST-NOT;
1776   generate the "*" value.
[1163]1779   The field-names given are not limited to the set of standard header
[949]1780   fields defined by this specification. Field names are case-insensitive.
[540]1784<section anchor="header.warning" title="Warning">
[1120]1785   <iref item="Warning header field" primary="true" x:for-anchor="" />
1786   <iref item="Header Fields" primary="true" subitem="Warning" x:for-anchor="" />
[949]1787   <x:anchor-alias value="Warning"/>
1788   <x:anchor-alias value="warning-value"/>
1789   <x:anchor-alias value="warn-agent"/>
1790   <x:anchor-alias value="warn-code"/>
1791   <x:anchor-alias value="warn-date"/>
1792   <x:anchor-alias value="warn-text"/>
[1163]1794   The "Warning" header field is used to carry additional information
[949]1795   about the status or transformation of a message that might not be reflected
1796   in the message. This information is typically used to warn about possible
1797   incorrectness introduced by caching operations or transformations applied
1798   to the payload of the message.
[949]1801   Warnings can be used for other purposes, both cache-related and otherwise.
1802   The use of a warning, rather than an error status code, distinguishes these
1803   responses from true failures.
[994]1806   Warning header fields can in general be applied to any message, however some
[949]1807   warn-codes are specific to caches and can only be applied to response
1808   messages.
[1231]1810<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Warning"/><iref primary="true" item="Grammar" subitem="warning-value"/><iref primary="true" item="Grammar" subitem="warn-code"/><iref primary="true" item="Grammar" subitem="warn-agent"/><iref primary="true" item="Grammar" subitem="warn-text"/><iref primary="true" item="Grammar" subitem="warn-date"/>
1811  <x:ref>Warning</x:ref>       = 1#<x:ref>warning-value</x:ref>
[229]1813  <x:ref>warning-value</x:ref> = <x:ref>warn-code</x:ref> <x:ref>SP</x:ref> <x:ref>warn-agent</x:ref> <x:ref>SP</x:ref> <x:ref>warn-text</x:ref>
1814                                        [<x:ref>SP</x:ref> <x:ref>warn-date</x:ref>]
[229]1816  <x:ref>warn-code</x:ref>  = 3<x:ref>DIGIT</x:ref>
[334]1817  <x:ref>warn-agent</x:ref> = ( <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ) / <x:ref>pseudonym</x:ref>
[135]1818                  ; the name or pseudonym of the server adding
[994]1819                  ; the Warning header field, for use in debugging
[229]1820  <x:ref>warn-text</x:ref>  = <x:ref>quoted-string</x:ref>
1821  <x:ref>warn-date</x:ref>  = <x:ref>DQUOTE</x:ref> <x:ref>HTTP-date</x:ref> <x:ref>DQUOTE</x:ref>
[949]1824   Multiple warnings can be attached to a response (either by the origin
1825   server or by a cache), including multiple warnings with the same code
1826   number, only differing in warn-text.
[949]1829   When this occurs, the user agent &SHOULD; inform the user of as many of
1830   them as possible, in the order that they appear in the response.
[1433]1833   Systems that generate multiple Warning header fields are encouraged to
1834   order them with this user agent behavior in mind. New Warning header fields
1835   are added after any existing Warning headers fields.
[949]1838   Warnings are assigned three digit warn-codes. The first digit indicates
1839   whether the Warning is required to be deleted from a stored response after
1840   validation:
1841   <list style="symbols">
1842      <t>1xx Warnings describe the freshness or validation status of the
[1112]1843      response, and so &MUST; be deleted by a cache after validation. They can
[949]1844      only be generated by a cache when validating a cached entry, and
1845      &MUST-NOT; be generated in any other situation.</t>
1846      <t>2xx Warnings describe some aspect of the representation that is not
1847      rectified by a validation (for example, a lossy compression of the
[1112]1848      representation) and &MUST-NOT; be deleted by a cache after validation,
[949]1849      unless a full response is returned, in which case they &MUST; be.</t>
1850   </list>
[994]1853   If an implementation sends a message with one or more Warning header fields to a
[949]1854   receiver whose version is HTTP/1.0 or lower, then the sender &MUST; include
[994]1855   in each warning-value a warn-date that matches the Date header field in the
[949]1856   message.
[1112]1859   If a system receives a message with a warning-value that includes
[949]1860   a warn-date, and that warn-date is different from the Date value in the
1861   response, then that warning-value &MUST; be deleted from the message before
1862   storing, forwarding, or using it. (preventing the consequences of naive
1863   caching of Warning header fields.) If all of the warning-values are deleted
[994]1864   for this reason, the Warning header field &MUST; be deleted as well.
[949]1867   The following warn-codes are defined by this specification, each with a
1868   recommended warn-text in English, and a description of its meaning.
1871<section title="110 Response is Stale" anchor="warn.110">
1872  <iref primary="true" item="110 Response is Stale (warn code)" x:for-anchor=""/>
1873  <iref primary="true" item="Warn Codes" subitem="110 Response is Stale" x:for-anchor=""/>
1875   A cache &SHOULD; include this whenever the returned response is stale.
1879<section title="111 Revalidation Failed" anchor="warn.111">
1880  <iref primary="true" item="111 Revalidation Failed (warn code)" x:for-anchor=""/>
1881  <iref primary="true" item="Warn Codes" subitem="111 Revalidation Failed" x:for-anchor=""/>
1883   A cache &SHOULD; include this when returning a stale response because an
1884   attempt to validate the response failed, due to an inability to reach
1885   the server.
1889<section title="112 Disconnected Operation" anchor="warn.112">
1890  <iref primary="true" item="112 Disconnected Operation (warn code)" x:for-anchor=""/>
1891  <iref primary="true" item="Warn Codes" subitem="112 Disconnected Operation" x:for-anchor=""/>
1893   A cache &SHOULD; include this if it is intentionally disconnected from
1894   the rest of the network for a period of time.
1898<section title="113 Heuristic Expiration" anchor="warn.113">
1899  <iref primary="true" item="113 Heuristic Expiration (warn code)" x:for-anchor=""/>
1900  <iref primary="true" item="Warn Codes" subitem="113 Heuristic Expiration" x:for-anchor=""/>
1902   A cache &SHOULD; include this if it heuristically chose a freshness
1903   lifetime greater than 24 hours and the response's age is greater than 24
1904   hours.
1908<section title="199 Miscellaneous Warning" anchor="warn.199">
1909  <iref primary="true" item="199 Miscellaneous Warning (warn code)" x:for-anchor=""/>
1910  <iref primary="true" item="Warn Codes" subitem="199 Miscellaneous Warning" x:for-anchor=""/>
1912   The warning text can include arbitrary information to be presented to
1913   a human user, or logged. A system receiving this warning &MUST-NOT; take
1914   any automated action, besides presenting the warning to the user.
1918<section title="214 Transformation Applied" anchor="warn.214">
1919  <iref primary="true" item="214 Transformation Applied (warn code)" x:for-anchor=""/>
1920  <iref primary="true" item="Warn Codes" subitem="214 Transformation Applied" x:for-anchor=""/>
1922   &MUST; be added by a proxy if it applies any transformation to the
1923   representation, such as changing the content-coding, media-type, or
1924   modifying the representation data, unless this Warning code already appears
1925   in the response.
1929<section title="299 Miscellaneous Persistent Warning" anchor="warn.299">
1930  <iref primary="true" item="299 Miscellaneous Persistent Warning (warn code)" x:for-anchor=""/>
1931  <iref primary="true" item="Warn Codes" subitem="299 Miscellaneous Persistent Warning" x:for-anchor=""/>
1933   The warning text can include arbitrary information to be presented to
1934   a human user, or logged. A system receiving this warning &MUST-NOT; take
1935   any automated action.
[1485]1939<section title="Warn Code Extensions" anchor="warn.code.extensions">
1941   The HTTP Warn Code Registry defines the name space for warn codes.
1944   A registration &MUST; include the following fields:
1945   <list style="symbols">
1946      <t>Warn Code (3 digits)</t>
1947      <t>Short Description</t>
1948      <t>Pointer to specification text</t>
1949   </list>
1952   Values to be added to this name space are subject to IETF review (<xref
1953   target="RFC5226" x:fmt="," x:sec="4.1"/>).
1956   The registry itself is maintained at <eref
1957   target=""/>.
[540]1963<section anchor="history.lists" title="History Lists">
[949]1965   User agents often have history mechanisms, such as "Back" buttons and
1966   history lists, that can be used to redisplay a representation retrieved
1967   earlier in a session.
[949]1970   The freshness model (<xref target="expiration.model"/>) does not
1971   necessarily apply to history mechanisms. I.e., a history mechanism can
1972   display a previous representation even if it has expired.
1975   This does not prohibit the history mechanism from telling the user that a
1976   view might be stale, or from honoring cache directives (e.g.,
1977   Cache-Control: no-store).
[540]1982<section anchor="IANA.considerations" title="IANA Considerations">
[949]1984<section title="Cache Directive Registry"
1985   anchor="cache.directive.registration">
[949]1987   The registration procedure for HTTP Cache Directives is defined by <xref
1988   target="cache.control.extensions"/> of this document.
[969]1991   The HTTP Cache Directive Registry shall be created at <eref
[949]1992   target=""/> and be
1993   populated with the registrations below:
1995<?BEGININC p6-cache.cache-directives ?>
1996<!--AUTOGENERATED FROM extract-cache-directives-defs.xslt, do not edit manually-->
[825]1997<texttable xmlns:my="#my" align="left" suppress-title="true"
[817]1998           anchor="iana.cache.directive.registration.table">
1999   <ttcol>Cache Directive</ttcol>
2000   <ttcol>Reference</ttcol>
2002   <c>max-age</c>
2003   <c>
2004      <xref target="cache-request-directive"/>, <xref target="cache-response-directive"/>
2005   </c>
2006   <c>max-stale</c>
2007   <c>
2008      <xref target="cache-request-directive"/>
2009   </c>
2010   <c>min-fresh</c>
2011   <c>
2012      <xref target="cache-request-directive"/>
2013   </c>
2014   <c>must-revalidate</c>
2015   <c>
2016      <xref target="cache-response-directive"/>
2017   </c>
2018   <c>no-cache</c>
2019   <c>
2020      <xref target="cache-request-directive"/>, <xref target="cache-response-directive"/>
2021   </c>
2022   <c>no-store</c>
2023   <c>
2024      <xref target="cache-request-directive"/>, <xref target="cache-response-directive"/>
2025   </c>
2026   <c>no-transform</c>
2027   <c>
2028      <xref target="cache-request-directive"/>, <xref target="cache-response-directive"/>
2029   </c>
2030   <c>only-if-cached</c>
2031   <c>
2032      <xref target="cache-request-directive"/>
2033   </c>
2034   <c>private</c>
2035   <c>
2036      <xref target="cache-response-directive"/>
2037   </c>
2038   <c>proxy-revalidate</c>
2039   <c>
2040      <xref target="cache-response-directive"/>
2041   </c>
2042   <c>public</c>
2043   <c>
2044      <xref target="cache-response-directive"/>
2045   </c>
2046   <c>s-maxage</c>
2047   <c>
2048      <xref target="cache-response-directive"/>
2049   </c>
[825]2050   <c>stale-if-error</c>
2051   <c>
2052      <xref xmlns:x="" target="RFC5861" x:fmt="," x:sec="4"/>
2053   </c>
2054   <c>stale-while-revalidate</c>
2055   <c>
2056      <xref xmlns:x="" target="RFC5861" x:fmt="," x:sec="3"/>
2057   </c>
2060<?ENDINC p6-cache.cache-directives ?>
[1485]2063<section title="Warn Code Registry"
2064   anchor="warn.code.registration">
2066   The registration procedure for HTTP Warn Codes is defined by <xref
2067   target="warn.code.extensions"/> of this document.
2070   The HTTP Warn Code Registry shall be created at <eref
2071   target=""/> and be
2072   populated with the registrations below:
[1487]2074<?BEGININC p6-cache.iana-warn-codes ?>
2075<!--AUTOGENERATED FROM extract-warn-code-defs.xslt, do not edit manually-->
2076<texttable align="left" suppress-title="true" anchor="iana.warn.code.registration.table">
[1485]2077   <ttcol>Warn Code</ttcol>
2078   <ttcol>Short Description</ttcol>
2079   <ttcol>Reference</ttcol>
2080   <c>110</c>
[1487]2081   <c>Response is Stale</c>
2082   <c>
2083      <xref target="warn.110"/>
2084   </c>
[1485]2085   <c>111</c>
[1487]2086   <c>Revalidation Failed</c>
2087   <c>
2088      <xref target="warn.111"/>
2089   </c>
[1485]2090   <c>112</c>
[1487]2091   <c>Disconnected Operation</c>
2092   <c>
2093      <xref target="warn.112"/>
2094   </c>
[1485]2095   <c>113</c>
[1487]2096   <c>Heuristic Expiration</c>
2097   <c>
2098      <xref target="warn.113"/>
2099   </c>
[1485]2100   <c>199</c>
[1487]2101   <c>Miscellaneous Warning</c>
2102   <c>
2103      <xref target="warn.199"/>
2104   </c>
[1485]2105   <c>214</c>
[1487]2106   <c>Transformation Applied</c>
2107   <c>
2108      <xref target="warn.214"/>
2109   </c>
[1485]2110   <c>299</c>
[1487]2111   <c>Miscellaneous Persistent Warning</c>
2112   <c>
2113      <xref target="warn.299"/>
2114   </c>
2117<?ENDINC p6-cache.iana-warn-codes ?>
[921]2120<section title="Header Field Registration" anchor="header.field.registration">
[949]2122  The Message Header Field Registry located at <eref 
[540]2123  target="" />
[969]2124  shall be updated with the permanent registrations below (see <xref target="RFC3864" />):
[680]2126<?BEGININC p6-cache.iana-headers ?>
[540]2127<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
[680]2128<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
2129   <ttcol>Header Field Name</ttcol>
2130   <ttcol>Protocol</ttcol>
2131   <ttcol>Status</ttcol>
2132   <ttcol>Reference</ttcol>
[680]2134   <c>Age</c>
2135   <c>http</c>
2136   <c>standard</c>
2137   <c>
2138      <xref target="header.age"/>
2139   </c>
2140   <c>Cache-Control</c>
2141   <c>http</c>
2142   <c>standard</c>
2143   <c>
2144      <xref target="header.cache-control"/>
2145   </c>
2146   <c>Expires</c>
2147   <c>http</c>
2148   <c>standard</c>
2149   <c>
2150      <xref target="header.expires"/>
2151   </c>
2152   <c>Pragma</c>
2153   <c>http</c>
2154   <c>standard</c>
2155   <c>
2156      <xref target="header.pragma"/>
2157   </c>
2158   <c>Vary</c>
2159   <c>http</c>
2160   <c>standard</c>
2161   <c>
2162      <xref target="header.vary"/>
2163   </c>
2164   <c>Warning</c>
2165   <c>http</c>
2166   <c>standard</c>
2167   <c>
2168      <xref target="header.warning"/>
2169   </c>
[680]2172<?ENDINC p6-cache.iana-headers ?>
[949]2174   The change controller is: "IETF ( - Internet Engineering Task
2175   Force".
[540]2180<section anchor="security.considerations" title="Security Considerations">
[949]2182   Caches expose additional potential vulnerabilities, since the contents of
2183   the cache represent an attractive target for malicious exploitation.
2184   Because cache contents persist after an HTTP request is complete, an attack
2185   on the cache can reveal information long after a user believes that the
2186   information has been removed from the network. Therefore, cache contents
[969]2187   need to be protected as sensitive information.
[1364]2191<section title="Acknowledgments" anchor="acks">
[1364]2193  See &acks;.
2200<references title="Normative References">
[540]2202  <reference anchor="Part1">
2203    <front>
2204      <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
2205      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
[1106]2206        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[540]2207        <address><email></email></address>
2208      </author>
2209      <author fullname="Jim Gettys" initials="J." surname="Gettys">
[844]2210        <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
2211        <address><email></email></address>
[540]2212      </author>
2213      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
2214        <organization abbrev="HP">Hewlett-Packard Company</organization>
2215        <address><email></email></address>
2216      </author>
2217      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
2218        <organization abbrev="Microsoft">Microsoft Corporation</organization>
2219        <address><email></email></address>
2220      </author>
2221      <author fullname="Larry Masinter" initials="L." surname="Masinter">
[1106]2222        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[540]2223        <address><email></email></address>
2224      </author>
2225      <author fullname="Paul J. Leach" initials="P." surname="Leach">
2226        <organization abbrev="Microsoft">Microsoft Corporation</organization>
2227        <address><email></email></address>
2228      </author>
2229      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
2230        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2231        <address><email></email></address>
2232      </author>
2233      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2234        <organization abbrev="W3C">World Wide Web Consortium</organization>
2235        <address><email></email></address>
2236      </author>
2237      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2238        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2239        <address><email></email></address>
2240      </author>
2241      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2242    </front>
2243    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;" />
2244    <x:source basename="p1-messaging" href="p1-messaging.xml" />
2245  </reference>
[540]2247  <reference anchor="Part2">
2248    <front>
2249      <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
2250      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
[1106]2251        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[540]2252        <address><email></email></address>
2253      </author>
2254      <author fullname="Jim Gettys" initials="J." surname="Gettys">
[844]2255        <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
2256        <address><email></email></address>
[540]2257      </author>
2258      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
2259        <organization abbrev="HP">Hewlett-Packard Company</organization>
2260        <address><email></email></address>
2261      </author>
2262      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
2263        <organization abbrev="Microsoft">Microsoft Corporation</organization>
2264        <address><email></email></address>
2265      </author>
2266      <author fullname="Larry Masinter" initials="L." surname="Masinter">
[1106]2267        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[540]2268        <address><email></email></address>
2269      </author>
2270      <author fullname="Paul J. Leach" initials="P." surname="Leach">
2271        <organization abbrev="Microsoft">Microsoft Corporation</organization>
2272        <address><email></email></address>
2273      </author>
2274      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
2275        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2276        <address><email></email></address>
2277      </author>
2278      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2279        <organization abbrev="W3C">World Wide Web Consortium</organization>
2280        <address><email></email></address>
2281      </author>
2282      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2283        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2284        <address><email></email></address>
2285      </author>
2286      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2287    </front>
2288    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;" />
2289    <x:source basename="p2-semantics" href="p2-semantics.xml" />
2290  </reference>
[540]2292  <reference anchor="Part4">
2293    <front>
2294      <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
2295      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
[1106]2296        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[540]2297        <address><email></email></address>
2298      </author>
2299      <author fullname="Jim Gettys" initials="J." surname="Gettys">
[844]2300        <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
2301        <address><email></email></address>
[540]2302      </author>
2303      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
2304        <organization abbrev="HP">Hewlett-Packard Company</organization>
2305        <address><email></email></address>
2306      </author>
2307      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
2308        <organization abbrev="Microsoft">Microsoft Corporation</organization>
2309        <address><email></email></address>
2310      </author>
2311      <author fullname="Larry Masinter" initials="L." surname="Masinter">
[1106]2312        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[540]2313        <address><email></email></address>
2314      </author>
2315      <author fullname="Paul J. Leach" initials="P." surname="Leach">
2316        <organization abbrev="Microsoft">Microsoft Corporation</organization>
2317        <address><email></email></address>
2318      </author>
2319      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
2320        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2321        <address><email></email></address>
2322      </author>
2323      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2324        <organization abbrev="W3C">World Wide Web Consortium</organization>
2325        <address><email></email></address>
2326      </author>
2327      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2328        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2329        <address><email></email></address>
2330      </author>
2331      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2332    </front>
2333    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;" />
2334    <x:source basename="p4-conditional" href="p4-conditional.xml" />
2335  </reference>
[540]2337  <reference anchor="Part5">
2338    <front>
2339      <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
2340      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
[1106]2341        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[540]2342        <address><email></email></address>
2343      </author>
2344      <author fullname="Jim Gettys" initials="J." surname="Gettys">
[844]2345        <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
2346        <address><email></email></address>
[540]2347      </author>
2348      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
2349        <organization abbrev="HP">Hewlett-Packard Company</organization>
2350        <address><email></email></address>
2351      </author>
2352      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
2353        <organization abbrev="Microsoft">Microsoft Corporation</organization>
2354        <address><email></email></address>
2355      </author>
2356      <author fullname="Larry Masinter" initials="L." surname="Masinter">
[1106]2357        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[540]2358        <address><email></email></address>
2359      </author>
2360      <author fullname="Paul J. Leach" initials="P." surname="Leach">
2361        <organization abbrev="Microsoft">Microsoft Corporation</organization>
2362        <address><email></email></address>
2363      </author>
2364      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
2365        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2366        <address><email></email></address>
2367      </author>
2368      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2369        <organization abbrev="W3C">World Wide Web Consortium</organization>
2370        <address><email></email></address>
2371      </author>
2372      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2373        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2374        <address><email></email></address>
2375      </author>
2376      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2377    </front>
2378    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;" />
2379    <x:source basename="p5-range" href="p5-range.xml" />
2380  </reference>
[540]2382  <reference anchor="Part7">
2383    <front>
2384      <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
2385      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
[1106]2386        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[540]2387        <address><email></email></address>
2388      </author>
2389      <author fullname="Jim Gettys" initials="J." surname="Gettys">
[844]2390        <organization abbrev="Alcatel-Lucent">Alcatel-Lucent Bell Labs</organization>
2391        <address><email></email></address>
[540]2392      </author>
2393      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
2394        <organization abbrev="HP">Hewlett-Packard Company</organization>
2395        <address><email></email></address>
2396      </author>
2397      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
2398        <organization abbrev="Microsoft">Microsoft Corporation</organization>
2399        <address><email></email></address>
2400      </author>
2401      <author fullname="Larry Masinter" initials="L." surname="Masinter">
[1106]2402        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
[540]2403        <address><email></email></address>
2404      </author>
2405      <author fullname="Paul J. Leach" initials="P." surname="Leach">
2406        <organization abbrev="Microsoft">Microsoft Corporation</organization>
2407        <address><email></email></address>
2408      </author>
2409      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
2410        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2411        <address><email></email></address>
2412      </author>
2413      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2414        <organization abbrev="W3C">World Wide Web Consortium</organization>
2415        <address><email></email></address>
2416      </author>
2417      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2418        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2419        <address><email></email></address>
2420      </author>
2421      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2422    </front>
2423    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;" />
2424    <x:source basename="p7-auth" href="p7-auth.xml" />
2425  </reference>
[540]2427  <reference anchor="RFC2119">
2428    <front>
2429      <title>Key words for use in RFCs to Indicate Requirement Levels</title>
2430      <author fullname="Scott Bradner" initials="S." surname="Bradner">
2431        <organization>Harvard University</organization>
2432        <address><email></email></address>
2433      </author>
2434      <date month="March" year="1997" />
2435    </front>
2436    <seriesInfo name="BCP" value="14" />
2437    <seriesInfo name="RFC" value="2119" />
2438  </reference>
[540]2440  <reference anchor="RFC5234">
2441    <front>
2442      <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
2443      <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
2444        <organization>Brandenburg InternetWorking</organization>
2445        <address>
[728]2446          <email></email>
2447        </address> 
[540]2448      </author>
2449      <author initials="P." surname="Overell" fullname="Paul Overell">
2450        <organization>THUS plc.</organization>
2451        <address>
[728]2452          <email></email>
2453        </address>
[540]2454      </author>
2455      <date month="January" year="2008"/>
2456    </front>
2457    <seriesInfo name="STD" value="68"/>
2458    <seriesInfo name="RFC" value="5234"/>
2459  </reference>
[540]2463<references title="Informative References">
[540]2465  <reference anchor="RFC1305">
2466    <front>
2467      <title>Network Time Protocol (Version 3) Specification, Implementation</title>
2468      <author fullname="David L. Mills" initials="D." surname="Mills">
2469        <organization>University of Delaware, Electrical Engineering Department</organization>
2470        <address><email></email></address>
2471      </author>
2472      <date month="March" year="1992" />
2473    </front>
2474    <seriesInfo name="RFC" value="1305" />
2475  </reference>
[540]2477  <reference anchor="RFC2616">
2478    <front>
2479      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2480      <author fullname="R. Fielding" initials="R." surname="Fielding">
2481        <organization>University of California, Irvine</organization>
2482        <address><email></email></address>
2483      </author>
2484      <author fullname="J. Gettys" initials="J." surname="Gettys">
2485        <organization>W3C</organization>
2486        <address><email></email></address>
2487      </author>
2488      <author fullname="J. Mogul" initials="J." surname="Mogul">
2489        <organization>Compaq Computer Corporation</organization>
2490        <address><email></email></address>
2491      </author>
2492      <author fullname="H. Frystyk" initials="H." surname="Frystyk">
2493        <organization>MIT Laboratory for Computer Science</organization>
2494        <address><email></email></address>
2495      </author>
2496      <author fullname="L. Masinter" initials="L." surname="Masinter">
2497        <organization>Xerox Corporation</organization>
2498        <address><email></email></address>
2499      </author>
2500      <author fullname="P. Leach" initials="P." surname="Leach">
2501        <organization>Microsoft Corporation</organization>
2502        <address><email></email></address>
2503      </author>
2504      <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee">
2505        <organization>W3C</organization>
2506        <address><email></email></address>
2507      </author>
2508      <date month="June" year="1999" />
2509    </front>
2510    <seriesInfo name="RFC" value="2616" />
2511  </reference>
2513  <reference anchor="RFC3864">
2514    <front>
2515      <title>Registration Procedures for Message Header Fields</title>
2516      <author fullname="G. Klyne" initials="G." surname="Klyne">
2517        <organization>Nine by Nine</organization>
2518        <address><email></email></address>
2519      </author>
2520      <author fullname="M. Nottingham" initials="M." surname="Nottingham">
2521        <organization>BEA Systems</organization>
2522        <address><email></email></address>
2523      </author>
2524      <author fullname="J. Mogul" initials="J." surname="Mogul">
2525        <organization>HP Labs</organization>
2526        <address><email></email></address>
2527      </author>
2528      <date month="September" year="2004" />
2529    </front>
2530    <seriesInfo name="BCP" value="90" />
2531    <seriesInfo name="RFC" value="3864" />
2532  </reference>
[817]2534  <reference anchor='RFC5226'>
2535    <front>
2536      <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
2537      <author initials='T.' surname='Narten' fullname='T. Narten'>
2538        <organization>IBM</organization>
2539        <address><email></email></address>
2540      </author>
2541      <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
2542        <organization>Google</organization>
2543        <address><email></email></address>
2544      </author>
2545      <date year='2008' month='May' />
2546    </front>
2547    <seriesInfo name='BCP' value='26' />
2548    <seriesInfo name='RFC' value='5226' />
2549  </reference>
[825]2551  <reference anchor='RFC5861'>
2552    <front>
2553      <title abbrev="HTTP stale controls">HTTP Cache-Control Extensions for Stale Content</title>
2554      <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
2555        <organization>Yahoo! Inc.</organization>
2556        <address><email></email></address>
2557      </author>
2558      <date month="April" year="2010"/>
2559    </front>
2560    <seriesInfo name='RFC' value='5861' />
2561  </reference>
2565<section anchor="changes.from.rfc.2616" title="Changes from RFC 2616">
[795]2567  Make the specified age calculation algorithm less conservative.
2568  (<xref target="age.calculations"/>)
[691]2571  Remove requirement to consider Content-Location in successful responses
2572  in order to determine the appropriate response to use.
2573  (<xref target="validation.model" />)
[540]2576  Clarify denial of service attack avoidance requirement.
2577  (<xref target="invalidation.after.updates.or.deletions" />)
[1231]2580  Change ABNF productions for header fields to only define the field value.
[1415]2581  (<xref target="header.field.definitions"/>)
[994]2584  Do not mention RFC 2047 encoding and multiple languages in Warning header fields
[669]2585  anymore, as these aspects never were implemented.
2586  (<xref target="header.warning" />)
[680]2590<?BEGININC p6-cache.abnf-appendix ?>
[427]2591<section xmlns:x="" title="Collected ABNF" anchor="collected.abnf">
2593<artwork type="abnf" name="p6-cache.parsed-abnf">
[1231]2594<x:ref>Age</x:ref> = delta-seconds
[1231]2596<x:ref>Cache-Control</x:ref> = *( "," OWS ) cache-directive *( OWS "," [ OWS
[425]2597 cache-directive ] )
[1231]2599<x:ref>Expires</x:ref> = HTTP-date
[1436]2601<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part2], Section 8&gt;
[1523]2603<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 3.2.1&gt;
[1231]2605<x:ref>Pragma</x:ref> = *( "," OWS ) pragma-directive *( OWS "," [ OWS
[425]2606 pragma-directive ] )
[1231]2608<x:ref>Vary</x:ref> = "*" / ( *( "," OWS ) field-name *( OWS "," [ OWS field-name ]
2609 ) )
[1231]2611<x:ref>Warning</x:ref> = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ]
2612 )
[427]2614<x:ref>cache-directive</x:ref> = cache-request-directive / cache-response-directive
2615<x:ref>cache-extension</x:ref> = token [ "=" ( token / quoted-string ) ]
2616<x:ref>cache-request-directive</x:ref> = "no-cache" / "no-store" / ( "max-age="
[425]2617 delta-seconds ) / ( "max-stale" [ "=" delta-seconds ] ) / (
2618 "min-fresh=" delta-seconds ) / "no-transform" / "only-if-cached" /
2619 cache-extension
[427]2620<x:ref>cache-response-directive</x:ref> = "public" / ( "private" [ "=" DQUOTE *( ","
[425]2621 OWS ) field-name *( OWS "," [ OWS field-name ] ) DQUOTE ] ) / (
2622 "no-cache" [ "=" DQUOTE *( "," OWS ) field-name *( OWS "," [ OWS
2623 field-name ] ) DQUOTE ] ) / "no-store" / "no-transform" /
2624 "must-revalidate" / "proxy-revalidate" / ( "max-age=" delta-seconds
2625 ) / ( "s-maxage=" delta-seconds ) / cache-extension
[427]2627<x:ref>delta-seconds</x:ref> = 1*DIGIT
2629<x:ref>extension-pragma</x:ref> = token [ "=" ( token / quoted-string ) ]
[678]2631<x:ref>field-name</x:ref> = &lt;field-name, defined in [Part1], Section 3.2&gt;
[1318]2633<x:ref>port</x:ref> = &lt;port, defined in [Part1], Section 2.7&gt;
[427]2634<x:ref>pragma-directive</x:ref> = "no-cache" / extension-pragma
[1436]2635<x:ref>pseudonym</x:ref> = &lt;pseudonym, defined in [Part1], Section 8.8&gt;
[1523]2637<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 3.2.4&gt;
[1523]2639<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 3.2.4&gt;
[1318]2641<x:ref>uri-host</x:ref> = &lt;uri-host, defined in [Part1], Section 2.7&gt;
2643<x:ref>warn-agent</x:ref> = ( uri-host [ ":" port ] ) / pseudonym
2644<x:ref>warn-code</x:ref> = 3DIGIT
2645<x:ref>warn-date</x:ref> = DQUOTE HTTP-date DQUOTE
2646<x:ref>warn-text</x:ref> = quoted-string
2647<x:ref>warning-value</x:ref> = warn-code SP warn-agent SP warn-text [ SP warn-date
[425]2648 ]
[532]2651<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
2652; Age defined but not used
[425]2653; Cache-Control defined but not used
2654; Expires defined but not used
2655; Pragma defined but not used
2656; Vary defined but not used
2657; Warning defined but not used
[680]2659<?ENDINC p6-cache.abnf-appendix ?>
[540]2661<section anchor="change.log" title="Change Log (to be removed by RFC Editor before publication)">
[1002]2663<section title="Since RFC 2616">
[540]2664  <t>Extracted relevant partitions from <xref target="RFC2616" />.</t>
[540]2667<section title="Since draft-ietf-httpbis-p6-cache-00">
2669  Closed issues:
2670  <list style="symbols">
2671    <t>
[542]2672      <eref target="" />: "Trailer" (<eref target="" />)</t>
[540]2673    <t>
2674      <eref target="" />: "Invalidation after Update or Delete" (<eref target="" />)</t>
2675    <t>
2676      <eref target="" />: "Normative and Informative references"</t>
2677    <t>
2678      <eref target="" />: "Date reference typo"</t>
2679    <t>
2680      <eref target="" />: "Connection header text"</t>
2681    <t>
2682      <eref target="" />: "Informative references"</t>
2683    <t>
2684      <eref target="" />: "ISO-8859-1 Reference"</t>
2685    <t>
2686      <eref target="" />: "Normative up-to-date references"</t>
2687    <t>
2688      <eref target="" />: "typo in 13.2.2"</t>
2689  </list>
2692  Other changes:
2693  <list style="symbols">
2694    <t>Use names of RFC4234 core rules DQUOTE and HTAB (work in progress on <eref
2695        target="" />)</t>
2696  </list>
[540]2700<section title="Since draft-ietf-httpbis-p6-cache-01">
2702  Closed issues:
2703  <list style="symbols">
2704    <t>
2705      <eref target="" />: "rel_path not used"</t>
2706  </list>
2709  Other changes:
2710  <list style="symbols">
2711    <t>Get rid of duplicate BNF rule names ("host" -&gt; "uri-host") (work in progress
2712      on <eref target="" />)</t>
2713    <t>Add explicit references to BNF syntax and rules imported from other parts of the
2714      specification.</t>
2715  </list>
[540]2719<section anchor="changes.since.02" title="Since draft-ietf-httpbis-p6-cache-02">
[994]2721  Ongoing work on IANA Message Header Field Registration (<eref target="" />):
[540]2722  <list style="symbols">
[994]2723    <t>Reference RFC 3984, and update header field registrations for header fields defined in this
[540]2724      document.</t>
2725  </list>
[540]2729<section anchor="changes.since.03" title="Since draft-ietf-httpbis-p6-cache-03">
2731  Closed issues:
2732  <list style="symbols">
2733    <t>
2734      <eref target="" />: "Vary header classification"</t>
2735  </list>
[540]2739<section anchor="changes.since.04" title="Since draft-ietf-httpbis-p6-cache-04">
2741  Ongoing work on ABNF conversion (<eref target=""/>):
2742  <list style="symbols">
2743    <t>
2744      Use "/" instead of "|" for alternatives.
2745    </t>
2746    <t>
2747      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
2748      whitespace ("OWS") and required whitespace ("RWS").
2749    </t>
2750    <t>
2751      Rewrite ABNFs to spell out whitespace rules, factor out
[994]2752      header field value format definitions.
[540]2753    </t>
2754  </list>
[540]2758<section anchor="changes.since.05" title="Since draft-ietf-httpbis-p6-cache-05">
2760  This is a total rewrite of this part of the specification.
2763  Affected issues:
2764  <list style="symbols">
2765    <t>
2766      <eref target="" />: "Definition of 1xx Warn-Codes"</t>
2767    <t>
[839]2768      <eref target="" />: "Placement of 13.5.1 and 13.5.2"</t>
[542]2769    <t>
[839]2770      <eref target="" />: "The role of Warning and Semantic Transparency in Caching"</t>
[542]2771    <t>
[839]2772      <eref target="" />: "Methods and Caching"</t>
[542]2773  </list>
[543]2776  In addition: Final work on ABNF conversion (<eref target=""/>):
[542]2777  <list style="symbols">
2778    <t>
2779      Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.
2780    </t>
2781  </list>
[547]2785<section anchor="changes.since.06" title="Since draft-ietf-httpbis-p6-cache-06">
[576]2787  Closed issues:
2788  <list style="symbols">
2789    <t>
2790      <eref target=""/>:
2791      "base for numeric protocol elements"
2792    </t>
2793  </list>
2796  Affected issues:
2797  <list style="symbols">
2798    <t>
2799      <eref target=""/>:
[1166]2800      "Vary and non-existant headers"
[607]2801    </t>
2802  </list>
[604]2806<section anchor="changes.since.07" title="Since draft-ietf-httpbis-p6-cache-07">
[669]2808  Closed issues:
2809  <list style="symbols">
2810    <t>
[711]2811      <eref target="" />:
2812      "Definition of 1xx Warn-Codes"
2813    </t>
2814    <t>
[691]2815      <eref target=""/>:
2816      "Content-Location on 304 responses"
2817    </t>
2818    <t>
[711]2819      <eref target="" />:
2820      "private and no-cache CC directives with headers"
2821    </t>
2822    <t>
[669]2823      <eref target=""/>:
2824      "RFC2047 and warn-text"
2825    </t>
2826  </list>
[720]2830<section anchor="changes.since.08" title="Since draft-ietf-httpbis-p6-cache-08">
[766]2832  Closed issues:
2833  <list style="symbols">
2834    <t>
[771]2835      <eref target="" />:
2836      "serving negotiated responses from cache: header-specific canonicalization"
2837    </t>
2838    <t>
[766]2839      <eref target="" />:
2840      "Effect of CC directives on history lists"
2841    </t>
[1291]2842    <t>
[1292]2843      <eref target="" />:
2844      "Cache Extensions can override no-store, etc."
2845    </t>
[766]2846  </list>
[722]2849  Affected issues:
2850  <list style="symbols">
2851    <t>
2852      <eref target=""/>:
2853      Status codes and caching
2854    </t>
2855  </list>
2858  Partly resolved issues:
2859  <list style="symbols">
2860    <t>
2861      <eref target=""/>:
2862      "Placement of 13.5.1 and 13.5.2"
2863    </t>
2864  </list>
[773]2868<section title="Since draft-ietf-httpbis-p6-cache-09" anchor="changes.since.09">
[792]2870  Closed issues:
2871  <list style="symbols">
2872    <t>
2873      <eref target="" />:
2874      "Age calculation"
2875    </t>
[817]2876    <t>
[827]2877      <eref target="" />:
2878      "Clarify differences between / requirements for request and response CC directives"
2879    </t>
2880    <t>
[1287]2881      <eref target="" />:
2882      "Caching authenticated responses"
2883    </t>
2884    <t>
[817]2885      <eref target="" />:
2886      "IANA registry for cache-control directives"
2887    </t>
[828]2888    <t>
2889      <eref target="" />:
2890      "Heuristic caching of URLs with query components"
2891    </t>
[792]2892  </list>
2895  Partly resolved issues:
2896  <list style="symbols">
2897    <t>
2898      <eref target=""/>:
2899      "Term for the requested resource's URI"
2900    </t>
2901  </list>
[841]2905<section title="Since draft-ietf-httpbis-p6-cache-10" anchor="changes.since.10">
[911]2907  Closed issues:
2908  <list style="symbols">
2909    <t>
[965]2910      <eref target=""/>:
2911      "Clarify entity / representation / variant terminology"
2912    </t>
2913    <t>
[911]2914      <eref target=""/>:
2915      "consider removing the 'changes from 2068' sections"
2916    </t>
[916]2917    <t>
2918      <eref target=""/>:
2919      "Allowing heuristic caching for new status codes"
2920    </t>
[944]2921    <t>
2922      Clean up TODOs and prose in "Combining Responses."
2923    </t>
[911]2924  </list>
[973]2928<section title="Since draft-ietf-httpbis-p6-cache-11" anchor="changes.since.11">
[1045]2930  Closed issues:
2931  <list style="symbols">
2932    <t>
2933      <eref target=""/>:
2934      "Text about clock requirement for caches belongs in p6"
2935    </t>
2936  </list>
[1052]2940<section title="Since draft-ietf-httpbis-p6-cache-12" anchor="changes.since.12">
[1130]2942  Closed issues:
2943  <list style="symbols">
2944    <t>
[1165]2945      <eref target=""/>:
2946      "Header Classification"
2947    </t>
2948    <t>
[1130]2949      <eref target=""/>:
2950      "Clarify 'public'"
2951    </t>
2952  </list>
[1180]2956<section title="Since draft-ietf-httpbis-p6-cache-13" anchor="changes.since.13">
[1231]2958  Closed issues:
2959  <list style="symbols">
2960    <t>
2961      <eref target=""/>:
2962      "untangle ABNFs for header fields"
2963    </t>
2964  </list>
[1271]2968<section title="Since draft-ietf-httpbis-p6-cache-14" anchor="changes.since.14">
[1284]2970  Closed issues:
[1287]2971  <list style="symbols">
2972    <t>
[1292]2973      <eref target=""/>:
2974      "Mismatch Vary"
2975    </t>
2976    <t>
[1319]2977      <eref target=""/>:
2978      "Cache Invalidation only happens upon successful responses"
2979    </t>
2980    <t>
[1323]2981      <eref target=""/>:
2982      "Recommend minimum sizes for protocol elements"
2983    </t>
2984    <t>
[1292]2985      <eref target=""/>:
2986      "Proxies don't 'understand' methods"
2987    </t>
[1314]2988    <t>
[1333]2989      <eref target=""/>:
2990      "Cache Extensions can override no-store, etc."
2991    </t>
2992    <t>
[1319]2993      <eref target=""/>:
2994      "Pragma"
[1315]2995    </t>
[1287]2996  </list>
[1326]3000<section title="Since draft-ietf-httpbis-p6-cache-15" anchor="changes.since.15">
[1400]3002  Closed issues:
3003  <list style="symbols">
3004    <t>
3005      <eref target=""/>:
3006      "Motivate one-year limit for Expires"
3007    </t>
3008  </list>
[1401]3012<section title="Since draft-ietf-httpbis-p6-cache-16" anchor="changes.since.16">
[1449]3014  Closed issues:
3015  <list style="symbols">
3016    <t>
[1452]3017      <eref target=""/>:
3018      "Document HTTP's error-handling philosophy"
3019    </t>
3020    <t>
[1449]3021      <eref target=""/>:
3022      "Cache-Control directive case sensitivity"
3023    </t>
3024  </list>
[1467]3028<section title="Since draft-ietf-httpbis-p6-cache-17" anchor="changes.since.17">
[1483]3030  Closed issues:
3031  <list style="symbols">
3032    <t>
3033      <eref target=""/>:
3034      "Interaction of request and response Cache-Control"
3035    </t>
[1484]3036    <t>
3037      <eref target=""/>:
3038      "Refining age for 1.1 proxy chains"
3039    </t>
[1485]3040    <t>
3041      <eref target=""/>:
3042      "warn-code registry"
3043    </t>
[1483]3044  </list>
[1499]3048<section title="Since draft-ietf-httpbis-p6-cache-18" anchor="changes.since.18">
3050  None yet.
[538]3055  </back>
Note: See TracBrowser for help on using the repository browser.