source: draft-ietf-httpbis/latest/auth48/rfc7234-to-be.xml @ 2678

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

add RFC7234-to-be and RFC7235-to-be (#553)

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 101.4 KB
Line 
1<?xml version="1.0" encoding="US-ASCII"?>
2
3<!-- v1 -->
4<!--
5    This XML document is the output of clean-for-DTD.xslt; a tool that strips
6    extensions to RFC2629(bis) from documents for processing with xml2rfc.
7-->
8<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
9<?rfc toc="yes" ?>
10<?rfc symrefs="yes" ?>
11<?rfc sortrefs="yes" ?>
12<?rfc compact="yes"?>
13<?rfc subcompact="no" ?>
14<?rfc linkmailto="no" ?>
15<?rfc editing="no" ?>
16<?rfc comments="yes"?>
17<?rfc inline="yes"?>
18<?rfc rfcedstyle="yes"?>
19<!DOCTYPE rfc
20  PUBLIC "" "rfc2629.dtd">
21<rfc submissionType="IETF" category="std" consensus="yes" number="7234" ipr="pre5378Trust200902" obsoletes="2616">
22
23<!-- [rfced] Note that we have made the following change based on your request
24     for other docs in this cluster during AUTH48:
25 
26     "defined in" updated to be "see" in the ABNF
27
28-->
29
30<front>
31
32  <title abbrev="HTTP/1.1 Caching">Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
33
34  <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
35    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
36    <address>
37      <postal>
38        <street>345 Park Ave</street>
39        <city>San Jose</city>
40        <region>CA</region>
41        <code>95110</code>
42        <country>USA</country>
43      </postal>
44      <email>fielding@gbiv.com</email>
45      <uri>http://roy.gbiv.com/</uri>
46    </address>
47  </author>
48
49  <author fullname="Mark Nottingham" initials="M." role="editor" surname="Nottingham">
50    <organization>Akamai</organization>
51    <address>
52      <email>mnot@mnot.net</email>
53      <uri>http://www.mnot.net/</uri>
54    </address>
55  </author>
56
57  <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
58    <organization abbrev="greenbytes">greenbytes GmbH</organization>
59    <address>
60      <postal>
61        <street>Hafenweg 16</street>
62        <city>Muenster</city><region>NW</region><code>48155</code>
63        <country>Germany</country>
64      </postal>
65      <email>julian.reschke@greenbytes.de</email>
66      <uri>http://greenbytes.de/tech/webdav/</uri>
67    </address>
68  </author>
69
70  <date month="May" year="2014"/>
71
72  <area>Applications</area>
73  <workgroup>HTTPbis Working Group</workgroup>
74
75<!-- [rfced] Please insert any keywords (beyond those that appear in
76the title) for use on http://www.rfc-editor.org/search.
77-->
78
79<keyword>example</keyword>
80
81<abstract>
82<t>
83   The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for
84   distributed, collaborative, hypertext information systems. This document
85   defines HTTP caches and the associated header fields
86   that control cache behavior or indicate cacheable response messages.
87</t>
88</abstract>
89
90   </front>
91   <middle>
92
93<section anchor="caching" title="Introduction">
94<t>
95   HTTP is typically used for distributed information systems, where
96   performance can be improved by the use of response caches. This document
97   defines aspects of HTTP/1.1 related to caching and reusing response
98   messages.
99</t>
100
101<iref item="cache"/>
102<t>
103   An HTTP cache is a local store of response messages and the
104   subsystem that controls storage, retrieval, and deletion of messages in it.
105   A cache stores cacheable responses in order to reduce the response time and
106   network bandwidth consumption on future, equivalent requests. Any client or
107   server MAY employ a cache, though a cache cannot be used by a server that
108   is acting as a tunnel.
109</t>
110<iref item="shared cache"/>
111<iref item="private cache"/>
112<t anchor="shared.and.private.caches">
113   A shared cache is a cache that stores responses to be reused
114   by more than one user; shared caches are usually (but not always) deployed
115   as a part of an intermediary. A private cache, in contrast,
116   is dedicated to a single user; often, they are deployed as a component of
117   a user agent.
118</t>
119<t>
120   The goal of caching in HTTP/1.1 is to significantly improve performance
121   by reusing a prior response message to satisfy a current request.
122   A stored response is considered "fresh", as defined in
123   <xref target="expiration.model"/>, if the response can be reused without
124   "validation" (checking with the origin server to see if the cached response
125   remains valid for this request).  A fresh response can therefore
126   reduce both latency and network overhead each time it is reused.
127   When a cached response is not fresh, it might still be reusable if it can
128   be freshened by validation (<xref target="validation.model"/>) or if the
129   origin is unavailable (<xref target="serving.stale.responses"/>).
130</t>
131
132<section title="Conformance and Error Handling" anchor="conformance">
133<t>
134   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
135   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
136   document are to be interpreted as described in <xref target="RFC2119"/>.
137</t>
138<t>
139   Conformance criteria and considerations regarding error handling
140   are defined in Section 2.5 of <xref target="RFC7230"/>.
141</t>
142</section>
143
144<section title="Syntax Notation" anchor="notation">
145<t>
146   This specification uses the Augmented Backus-Naur Form (ABNF) notation of
147   <xref target="RFC5234"/> with a list extension, defined in
148   Section 7 of <xref target="RFC7230"/>, that allows for compact definition of
149   comma-separated lists using a '#' operator (similar to how the '*' operator
150   indicates repetition).
151   <xref target="imported.abnf"/> describes rules imported from
152   other documents.
153   <xref target="collected.abnf"/> shows the collected grammar with all list
154   operators expanded to standard ABNF notation.
155</t>
156
157<section title="Delta Seconds" anchor="delta-seconds">
158<t>
159   The delta-seconds rule specifies a non-negative integer, representing time
160   in seconds.
161</t>
162<figure><iref item="Grammar" primary="true" subitem="delta-seconds"/><artwork type="abnf2616"><![CDATA[
163  delta-seconds  = 1*DIGIT
164]]></artwork></figure>
165<t>
166   A recipient parsing a delta-seconds value and converting it to binary form
167   ought to use an arithmetic type of at least 31 bits of non-negative integer
168   range.
169   If a cache receives a delta-seconds value greater than the greatest integer
170   it can represent, or if any of its subsequent calculations overflows,
171   the cache MUST consider the value to be either 2147483648
172   (2^31) or the greatest positive integer it can conveniently
173   represent.
174</t>
175<t><list>
176   <t>
177       Note: The value 2147483648 is here for historical reasons, effectively
178       represents infinity (over 68 years), and does not need to be stored in
179       binary form; an implementation could produce it as a canned string if
180       any overflow occurs, even if the calculations are performed with an
181       arithmetic type incapable of directly representing that number.
182       What matters here is that an overflow be detected and not treated as a
183       negative value in later calculations.
184   </t>
185</list></t>
186</section>
187
188</section>
189</section>
190
191<section anchor="caching.overview" title="Overview of Cache Operation">
192<iref item="cache entry"/>
193<iref item="cache key"/>
194<t>
195   Proper cache operation preserves the semantics of HTTP transfers
196   (<xref target="RFC7231"/>) while eliminating the transfer of information already held
197   in the cache.  Although caching is an entirely OPTIONAL feature of HTTP,
198   it can be assumed that reusing a cached response is desirable and that such
199   reuse is the default behavior when no requirement or local
200   configuration prevents it.  Therefore, HTTP cache requirements are focused
201   on preventing a cache from either storing a non-reusable response or
202   reusing a stored response inappropriately, rather than mandating that
203   caches always store and reuse particular responses.
204</t>
205<t>
206   Each cache entry consists of a cache key and one or more
207   HTTP responses corresponding to prior requests that used the same key. The
208   most common form of cache entry is a successful result of a retrieval
209   request: i.e., a 200 (OK) response to a GET request, which
210   contains a representation of the resource identified by the request target
211   (Section 4.3.1 of <xref target="RFC7231"/>). However, it is also possible to cache permanent redirects,
212   negative results (e.g., 404 (Not Found)),
213   incomplete results (e.g., 206 (Partial Content)), and
214   responses to methods other than GET if the method's definition allows such
215   caching and defines something suitable for use as a cache key.
216</t>
217<iref item="cache key"/>
218<t>
219   The primary cache key consists of the request method and
220   target URI.  However, since HTTP caches in common use today are typically
221   limited to caching responses to GET, many caches simply decline
222   other methods and use only the URI as the primary cache key.
223</t>
224<t>
225   If a request target is subject to content negotiation, its cache entry
226   might consist of multiple stored responses, each differentiated by a
227   secondary key for the values of the original request's selecting header
228   fields (<xref target="caching.negotiated.responses"/>).
229</t>
230</section>
231
232<section anchor="response.cacheability" title="Storing Responses in Caches">
233<t>
234   A cache MUST NOT store a response to any request, unless:
235   <list style="symbols">
236      <t>The request method is understood by the cache and defined as being
237      cacheable, and</t>
238      <t>the response status code is understood by the cache, and</t>
239      <t>the "no-store" cache directive (see <xref target="header.cache-control"/>) does not appear in request or response
240      header fields, and</t>
241      <t>the "private" response directive (see <xref target="cache-response-directive.private"/>) does not appear in the
242      response, if the cache is shared, and</t>
243      <t>the Authorization header field (see
244      Section 4.2 of <xref target="RFC7235"/>) does not appear in the request, if the cache is
245      shared, unless the response explicitly allows it (see <xref target="caching.authenticated.responses"/>), and</t>
246      <t>the response either:
247         <list style="symbols">
248            <t>contains an <xref target="header.expires" format="none">Expires</xref> header field (see
249            <xref target="header.expires"/>), or</t>
250            <t>contains a max-age response directive (see <xref target="cache-response-directive.max-age"/>), or</t>
251            <t>contains a s-maxage response directive (see <xref target="cache-response-directive.s-maxage"/>) and the cache is
252            shared, or</t>
253            <t>contains a Cache Control Extension (see <xref target="cache.control.extensions"/>) that allows it to be cached,
254            or</t>
255            <t>has a status code that is defined as cacheable by default
256            (see <xref target="heuristic.freshness"/>), or</t>
257            <t>contains a public response directive (see <xref target="cache-response-directive.public"/>).</t>
258         </list>
259      </t>
260   </list>
261</t>
262<t>
263   Note that any of the requirements listed above can be overridden by a
264   cache-control extension; see <xref target="cache.control.extensions"/>.
265</t>
266<t>
267   In this context, a cache has "understood" a request method or a response
268   status code if it recognizes it and implements all specified
269   caching-related behavior.
270</t>
271<t>
272   Note that, in normal operation, some caches will not store a response that
273   has neither a cache validator nor an explicit expiration time, as such
274   responses are not usually useful to store. However, caches are not
275   prohibited from storing such responses.
276</t>
277
278<section anchor="incomplete.responses" title="Storing Incomplete Responses">
279<t>
280   A response message is considered complete when all of the octets indicated
281   by the message framing (<xref target="RFC7230"/>) are received prior to the connection
282   being closed. If the request method is GET, the response status code is
283   200 (OK), and the entire response header section has been received, a
284   cache MAY store an incomplete response message body if the cache entry is
285   recorded as incomplete. Likewise, a 206 (Partial Content)
286   response MAY be stored as if it were an incomplete 200
287   (OK) cache entry. However, a cache MUST NOT store incomplete or
288   partial-content responses if it does not support the Range
289   and Content-Range header fields or if it does not understand
290   the range units used in those fields.
291</t>
292<t>
293   A cache MAY complete a stored incomplete response by making a subsequent
294   range request (<xref target="RFC7233"/>) and combining the successful response with the
295   stored entry, as defined in <xref target="combining.responses"/>. A cache
296   MUST NOT use an incomplete response to answer requests unless the
297   response has been made complete or the request is partial and specifies a
298   range that is wholly within the incomplete response. A cache MUST NOT
299   send a partial response to a client without explicitly marking it as such
300   using the 206 (Partial Content) status code.
301</t>
302</section>
303
304
305<section anchor="caching.authenticated.responses" title="Storing Responses to Authenticated Requests">
306<t>
307   A shared cache MUST NOT use a cached response to a request with an
308   Authorization header field (Section 4.2 of <xref target="RFC7235"/>) to
309   satisfy any subsequent request unless a cache directive that allows such
310   responses to be stored is present in the response.
311</t>
312<t>
313   In this specification, the following <xref target="header.cache-control" format="none">Cache-Control</xref> response
314   directives (<xref target="cache-response-directive"/>) have such an effect:
315   must-revalidate, public, and s-maxage.
316</t>
317<t>
318   Note that cached responses that contain the "must-revalidate" and/or
319   "s-maxage" response directives are not allowed to be served stale (<xref target="serving.stale.responses"/>) by shared caches. In particular, a
320   response with either "max-age=0, must-revalidate" or "s-maxage=0" cannot be
321   used to satisfy a subsequent request without revalidating it on the origin
322   server.
323</t>
324</section>
325
326<section anchor="combining.responses" title="Combining Partial Content">
327<t>
328   A response might transfer only a partial representation if the
329   connection closed prematurely or if the request used one or more Range
330   specifiers (<xref target="RFC7233"/>).  After several such transfers, a cache might have
331   received several ranges of the same representation.  A cache MAY combine
332   these ranges into a single stored response, and reuse that response to
333   satisfy later requests, if they all share the same strong validator and
334   the cache complies with the client requirements in Section 4.3 of <xref target="RFC7233"/>.
335</t>
336<t>
337   When combining the new response with one or more stored responses, a
338   cache MUST:
339   <list style="symbols">
340      <t>delete any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
341         with warn-code 1xx (see <xref target="header.warning"/>);</t>
342      <t>retain any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
343         with warn-code 2xx; and,</t>
344      <t>use other header fields provided in the new response, aside
345         from Content-Range, to replace all instances of the
346         corresponding header fields in the stored response.</t>
347   </list>
348</t>
349</section>
350
351</section>
352
353
354<section anchor="constructing.responses.from.caches" title="Constructing Responses from Caches">
355
356<t>
357   When presented with a request, a cache MUST NOT reuse a stored response,
358   unless:
359   <list style="symbols">
360      <t>The presented effective request URI (Section 5.5 of <xref target="RFC7230"/>) and
361      that of the stored response match, and</t>
362      <t>the request method associated with the stored response allows it to
363      be used for the presented request, and</t>
364      <t>selecting header fields nominated by the stored response (if any)
365      match those presented (see <xref target="caching.negotiated.responses"/>), and</t>
366      <t>the presented request does not contain the no-cache pragma (<xref target="header.pragma"/>), nor the no-cache cache directive (<xref target="cache-request-directive"/>), unless the stored response is
367      successfully validated (<xref target="validation.model"/>), and</t>
368      <t>the stored response does not contain the no-cache cache directive
369      (<xref target="cache-response-directive.no-cache"/>), unless it is
370      successfully validated (<xref target="validation.model"/>), and</t>
371      <t>the stored response is either:
372         <list style="symbols">
373            <t>fresh (see <xref target="expiration.model"/>), or</t>
374            <t>allowed to be served stale (see <xref target="serving.stale.responses"/>), or</t>
375            <t>successfully validated (see <xref target="validation.model"/>).</t>
376         </list>
377      </t>
378  </list>
379</t>
380<t>
381   Note that any of the requirements listed above can be overridden by a
382   cache-control extension; see <xref target="cache.control.extensions"/>.
383</t>
384<t>
385   When a stored response is used to satisfy a request without validation, a
386   cache MUST generate an <xref target="header.age" format="none">Age</xref> header field (<xref target="header.age"/>), replacing any present in the response with a value
387   equal to the stored response's current_age; see <xref target="age.calculations"/>.
388</t>
389<t>
390   A cache MUST write through requests with methods that are unsafe
391   (Section 4.2.1 of <xref target="RFC7231"/>) to the origin server; i.e., a cache is not allowed to
392   generate a reply to such a request before having forwarded the request and
393   having received a corresponding response.
394</t>
395<t>
396   Also, note that unsafe requests might invalidate already-stored responses;
397   see <xref target="invalidation"/>.
398</t>
399<t>
400   When more than one suitable response is stored, a cache MUST use the
401   most recent response (as determined by the Date header
402   field). It can also forward the request with "Cache-Control: max-age=0" or
403   "Cache-Control: no-cache" to disambiguate which response to use.
404</t>
405<t>
406   A cache that does not have a clock available MUST NOT use stored
407   responses without revalidating them upon every use.
408</t>
409
410<section anchor="caching.negotiated.responses" title="Calculating Secondary Keys with Vary">
411<t>
412   When a cache receives a request that can be satisfied by a stored response
413   that has a Vary header field (Section 7.1.4 of <xref target="RFC7231"/>),
414   it MUST NOT use that response unless all of the selecting header fields
415   nominated by the Vary header field match in both the original request
416   (i.e., that associated with the stored response), and the presented
417   request.
418</t>
419<t>
420   The selecting header fields from two requests are defined to match if and
421   only if those in the first request can be transformed to those in the
422   second request by applying any of the following:
423   <list style="symbols">
424      <t>
425         adding or removing whitespace, where allowed in the header field's
426         syntax
427      </t>
428      <t>
429         combining multiple header fields with the same field name
430         (see Section 3.2 of <xref target="RFC7230"/>)
431      </t>
432      <t>
433         normalizing both header field values in a way that is known to have
434         identical semantics, according to the header field's specification
435         (e.g., reordering field values when order is not significant;
436         case-normalization, where values are defined to be case-insensitive)
437      </t>
438  </list>
439</t>
440<t>
441   If (after any normalization that might take place) a header field is absent
442   from a request, it can only match another request if it is also absent
443   there.
444</t>
445<t>
446   A Vary header field-value of "*" always fails to match.
447</t>
448<t>
449   The stored response with matching selecting header fields is known as the
450   selected response.
451</t>
452<t>
453   If multiple selected responses are available (potentially including
454   responses without a Vary header field), the cache will need to choose one to use.
455   When a selecting header field has a known mechanism for doing so (e.g., qvalues on
456   Accept and similar request header fields), that mechanism MAY be
457   used to select preferred responses; of the remainder, the most recent
458   response (as determined by the Date header field) is used, as
459   per <xref target="constructing.responses.from.caches"/>.
460</t>
461<t>
462   If no selected response is available, the cache cannot satisfy the
463   presented request. Typically, it is forwarded to the origin server
464   in a (possibly conditional; see <xref target="validation.model"/>) request.
465</t>
466</section>
467
468<section anchor="expiration.model" title="Freshness">
469<iref item="fresh"/>
470<iref item="stale"/>
471<t>
472   A fresh response is one whose age has not yet exceeded its
473   freshness lifetime. Conversely, a stale
474   response is one where it has.
475</t>
476<iref item="freshness lifetime"/>
477<iref item="explicit expiration time"/>
478<iref item="heuristic expiration time"/>
479<t>
480   A response's freshness lifetime is the length of time
481   between its generation by the origin server and its expiration time. An
482   explicit expiration time is the time at which the origin
483   server intends that a stored response can no longer be used by a cache
484   without further validation, whereas a heuristic expiration
485   time is assigned by a cache when no explicit expiration time is
486   available.
487</t>
488<iref item="age"/>
489<t>
490   A response's age is the time that has passed since it was
491   generated by, or successfully validated with, the origin server. 
492</t>
493<t>
494   When a response is "fresh" in the cache, it can be used to satisfy
495   subsequent requests without contacting the origin server, thereby improving
496   efficiency.
497</t>
498<t>
499   The primary mechanism for determining freshness is for an origin server to
500   provide an explicit expiration time in the future, using either the
501   <xref target="header.expires" format="none">Expires</xref> header field (<xref target="header.expires"/>) or
502   the max-age response directive (<xref target="cache-response-directive.max-age"/>). Generally, origin servers
503   will assign future explicit expiration times to responses in the belief
504   that the representation is not likely to change in a semantically
505   significant way before the expiration time is reached.
506</t>
507<t>
508   If an origin server wishes to force a cache to validate every request, it
509   can assign an explicit expiration time in the past to indicate that the
510   response is already stale. Compliant caches will normally validate a stale
511   cached response before reusing it for subsequent requests (see <xref target="serving.stale.responses"/>).
512</t>
513<t>
514   Since origin servers do not always provide explicit expiration times,
515   caches are also allowed to use a heuristic to determine an expiration time
516   under certain circumstances (see <xref target="heuristic.freshness"/>).
517</t>
518<figure>
519<preamble>
520  The calculation to determine if a response is fresh is:
521</preamble>
522<artwork type="code"><![CDATA[
523   response_is_fresh = (freshness_lifetime > current_age)
524]]></artwork>
525</figure>
526<t>
527   freshness_lifetime is defined in <xref target="calculating.freshness.lifetime"/>; current_age is defined in
528   <xref target="age.calculations"/>.
529</t>
530<t>
531   Clients can send the max-age or min-fresh cache directives in a request to
532   constrain or relax freshness calculations for the corresponding response
533   (<xref target="cache-request-directive"/>).
534</t>
535<t>
536   When calculating freshness, to avoid common problems in date parsing:
537</t>
538<t>
539  <list style="symbols">
540     <t>Although all date formats are specified to be case-sensitive,
541        a cache recipient SHOULD match day, week, and time-zone names
542        case-insensitively.</t>
543             
544     <t>If a cache recipient's internal implementation of time has less
545        resolution than the value of an HTTP-date, the recipient MUST
546        internally represent a parsed <xref target="header.expires" format="none">Expires</xref> date as the
547        nearest time equal to or earlier than the received value.</t>
548
549     <t>A cache recipient MUST NOT allow local time zones to influence the
550        calculation or comparison of an age or expiration time.</t>
551
552     <t>A cache recipient SHOULD consider a date with a zone abbreviation
553        other than GMT or UTC to be invalid for calculating expiration.</t>
554  </list>
555</t>
556<t>
557   Note that freshness applies only to cache operation; it cannot be used to
558   force a user agent to refresh its display or reload a resource. See <xref target="history.lists"/> for an explanation of the difference between
559   caches and history mechanisms.
560</t>
561
562<section anchor="calculating.freshness.lifetime" title="Calculating Freshness Lifetime">
563<t>
564   A cache can calculate the freshness lifetime (denoted as
565   freshness_lifetime) of a response by using the first match using of the following:
566   <list style="symbols">
567      <t>If the cache is shared and the s-maxage response directive
568      (<xref target="cache-response-directive.s-maxage"/>) is present, use its value,
569      or</t>
570      <t>If the max-age response directive (<xref target="cache-response-directive.max-age"/>) is present, use its value, or</t>
571      <t>If the <xref target="header.expires" format="none">Expires</xref> response header field
572      (<xref target="header.expires"/>) is present, use its value minus the
573      value of the Date response header field,</t>
574      <t>Otherwise, no explicit expiration time is present in the response. A
575      heuristic freshness lifetime might be applicable; see <xref target="heuristic.freshness"/>.</t>
576   </list>
577</t>
578<t>
579   Note that this calculation is not vulnerable to clock skew, since all of
580   the information comes from the origin server.
581</t>
582<t>
583   When there is more than one value present for a given directive (e.g., two
584   <xref target="header.expires" format="none">Expires</xref> header fields, multiple Cache-Control: max-age
585   directives), the directive's value is considered invalid. Caches are
586   encouraged to consider responses that have invalid freshness information to
587   be stale.
588</t>
589</section>
590
591<section anchor="heuristic.freshness" title="Calculating Heuristic Freshness">
592<t>
593   Since origin servers do not always provide explicit expiration times, a
594   cache MAY assign a heuristic expiration time when an explicit time is not
595   specified, employing algorithms that use other header field values (such as
596   the Last-Modified time) to estimate a plausible expiration
597   time. This specification does not provide specific algorithms, but does
598   impose worst-case constraints on their results.
599</t>
600<t>
601   A cache MUST NOT use heuristics to determine freshness when an explicit
602   expiration time is present in the stored response. Because of the
603   requirements in <xref target="response.cacheability"/>, this means that,
604   effectively, heuristics can only be used on responses without explicit
605   freshness whose status codes are defined as cacheable by default (see
606   Section 6.1 of <xref target="RFC7231"/>), and those responses without explicit freshness that have
607   been marked as explicitly cacheable (e.g., with a "public" response
608   directive).
609</t>
610<t>
611   If the response has a Last-Modified header field
612   (Section 2.2 of <xref target="RFC7232"/>), caches are encouraged to use a heuristic
613   expiration value that is no more than some fraction of the interval since
614   that time. A typical setting of this fraction might be 10%.
615</t>
616<t>
617   When a heuristic is used to calculate freshness lifetime, a cache SHOULD
618   generate a <xref target="header.warning" format="none">Warning</xref> header field with a 113 warn-code (see
619   <xref target="warn.113"/>) in the response if its current_age is more than
620   24 hours and such a warning is not already present.
621</t>
622<t><list>
623   <t>
624      Note: Section 13.9 of <xref target="RFC2616"/> prohibited caches
625      from calculating heuristic freshness for URIs with query components
626      (i.e., those containing '?'). In practice, this has not been widely
627      implemented. Therefore, origin servers are encouraged to send explicit
628      directives (e.g., Cache-Control: no-cache) if they wish to preclude
629      caching.
630   </t>
631</list></t>
632</section>
633
634<section anchor="age.calculations" title="Calculating Age">
635<t>
636   The <xref target="header.age" format="none">Age</xref> header field is used to convey an estimated
637   age of the response message when obtained from a cache. The Age field value
638   is the cache's estimate of the number of seconds since the response was
639   generated or validated by the origin server. In essence, the Age value is
640   the sum of the time that the response has been resident in each of the
641   caches along the path from the origin server, plus the amount of time it
642   has been in transit along network paths.
643</t>
644<t>
645   The following data is used for the age calculation:
646</t>
647<t>
648   age_value
649   <list>
650      <t>
651         The term "age_value" denotes the value of the <xref target="header.age" format="none">Age</xref>
652         header field (<xref target="header.age"/>), in a form appropriate for
653         arithmetic operation; or 0, if not available.
654      </t>
655   </list>
656</t>
657<t>
658   date_value
659   <list>
660      <t>
661         The term "date_value" denotes the value of
662         the Date header field, in a form appropriate for arithmetic
663         operations. See Section 7.1.1.2 of <xref target="RFC7231"/> for the definition of the Date header
664         field, and for requirements regarding responses without it.
665      </t>
666   </list>
667</t>
668<t>
669   now
670   <list>
671      <t>
672         The term "now" means "the current value of the clock at the host
673         performing the calculation". A host ought to use NTP (<xref target="RFC5905"/>) or some similar protocol to synchronize its
674         clocks to Coordinated Universal Time.
675      </t>
676   </list>
677</t>
678<t>
679   request_time
680   <list>
681      <t>
682         The current value of the clock at the host at the time the request
683         resulting in the stored response was made.
684      </t>
685   </list>
686</t>
687<t>
688   response_time
689   <list>
690      <t>
691         The current value of the clock at the host at the time the response
692         was received.
693      </t>
694   </list>
695</t>
696<t>
697   A response's age can be calculated in two entirely independent ways:
698   <list style="numbers">
699      <t>the "apparent_age": response_time minus date_value, if the local
700      clock is reasonably well synchronized to the origin server's clock. If
701      the result is negative, the result is replaced by zero.</t>
702      <t>the "corrected_age_value", if all of the caches along the response
703      path implement HTTP/1.1. A cache MUST interpret this value relative
704      to the time the request was initiated, not the time that the response
705      was received.</t>
706   </list>
707</t>
708<figure>
709<artwork type="code"><![CDATA[
710  apparent_age = max(0, response_time - date_value);
711
712  response_delay = response_time - request_time;
713  corrected_age_value = age_value + response_delay; 
714]]></artwork>
715</figure>
716<figure>
717<preamble>These are combined as</preamble>
718<artwork type="code"><![CDATA[
719  corrected_initial_age = max(apparent_age, corrected_age_value);
720]]></artwork></figure>
721<t>
722   unless the cache is confident in the value of the <xref target="header.age" format="none">Age</xref> header
723   field (e.g., because there are no HTTP/1.0 hops in the Via
724   header field), in which case the corrected_age_value MAY be used as the
725   corrected_initial_age.
726</t>
727<t>
728   The current_age of a stored response can then be calculated by adding the
729   amount of time (in seconds) since the stored response was last validated by
730   the origin server to the corrected_initial_age.
731</t>
732<figure><artwork type="code"><![CDATA[
733  resident_time = now - response_time;
734  current_age = corrected_initial_age + resident_time;
735]]></artwork></figure>
736</section>
737
738<section anchor="serving.stale.responses" title="Serving Stale Responses">
739<t>
740   A "stale" response is one that either has explicit expiry information or is
741   allowed to have heuristic expiry calculated, but is not fresh according to
742   the calculations in <xref target="expiration.model"/>.
743</t>
744<t>
745   A cache MUST NOT generate a stale response if it is prohibited by an
746   explicit in-protocol directive (e.g., by a "no-store" or "no-cache" cache
747   directive, a "must-revalidate" cache-response-directive, or an applicable
748   "s-maxage" or "proxy-revalidate" cache-response-directive; see <xref
749   target="cache-response-directive"/>).
750
751<!-- [rfced] We wonder whether "cache-response-directive" should be "response
752cache-control directive" to match what appears in Section 5.2.2?
753
754Original:
755   A cache MUST NOT generate a stale response if it is prohibited by an
756   explicit in-protocol directive (e.g., by a "no-store" or "no-cache"
757   cache directive, a "must-revalidate" cache-response-directive, or an
758   applicable "s-maxage" or "proxy-revalidate" cache-response-directive;
759   see Section 5.2.2).
760
761We note that this is the only place in which "cache-response-directive" is
762used.  Please let us know if the text may be updated.
763
764-->
765
766
767</t>
768<t>
769   A cache MUST NOT send stale responses unless it is disconnected
770   (i.e., it cannot contact the origin server or otherwise find a forward
771   path) or doing so is explicitly allowed (e.g., by the max-stale request
772   directive; see <xref target="cache-request-directive"/>).
773</t>
774<t>
775   A cache SHOULD generate a <xref target="header.warning" format="none">Warning</xref> header field with the
776   110 warn-code (see <xref target="warn.110"/>) in stale responses.
777   Likewise, a cache SHOULD generate a 112 warn-code (see
778   <xref target="warn.112"/>) in stale responses if the cache is disconnected.
779</t>
780<t>
781   A cache SHOULD NOT generate a new <xref target="header.warning" format="none">Warning</xref> header field
782   when forwarding a response that does not have an <xref target="header.age" format="none">Age</xref> header
783   field, even if the response is already stale.  A cache need not validate
784   a response that merely became stale in transit.
785</t>
786</section>
787</section>
788
789<section anchor="validation.model" title="Validation">
790<t>
791   When a cache has one or more stored responses for a requested URI, but
792   cannot serve any of them (e.g., because they are not fresh, or one cannot
793   be selected; see <xref target="caching.negotiated.responses"/>), it can use
794   the conditional request mechanism <xref target="RFC7232"/> in the forwarded request to
795   give the next inbound server an opportunity to select a valid stored
796   response to use, updating the stored metadata in the process, or to replace
797   the stored response(s) with a new response. This process is known as
798   "validating" or "revalidating" the stored response.
799</t>
800
801<section anchor="validation.sent" title="Sending a Validation Request"><iref item="validator"/>
802<t>
803   When sending a conditional request for cache validation, a cache sends one
804   or more precondition header fields containing validator
805   metadata from its stored response(s), which is then compared by recipients
806   to determine whether a stored response is equivalent to a current
807   representation of the resource.
808</t>
809<t>
810   One such validator is the timestamp given in a Last-Modified
811   header field (Section 2.2 of <xref target="RFC7232"/>), which can be used in an
812   If-Modified-Since header field for response validation, or
813   in an If-Unmodified-Since or If-Range header
814   field for representation selection (i.e., the client is referring
815   specifically to a previously obtained representation with that timestamp).
816</t>
817<t>
818   Another validator is the entity-tag given in an ETag header
819   field (Section 2.3 of <xref target="RFC7232"/>). One or more entity-tags, indicating one or more
820   stored responses, can be used in an If-None-Match header
821   field for response validation, or in an If-Match or
822   If-Range header field for representation selection (i.e.,
823   the client is referring specifically to one or more previously obtained
824   representations with the listed entity-tags).
825</t>
826</section>
827
828<section anchor="validation.received" title="Handling a Received Validation Request">
829<t>
830   Each client in the request chain may have its own cache, so it is common
831   for a cache at an intermediary to receive conditional requests from other
832   (outbound) caches. Likewise, some user agents make use of conditional
833   requests to limit data transfers to recently modified representations or to
834   complete the transfer of a partially retrieved representation.
835</t>
836<t>
837   If a cache receives a request that can be satisfied by reusing one of
838   its stored 200 (OK) or 206 (Partial Content)
839   responses, the cache SHOULD evaluate any applicable conditional header
840   field preconditions received in that request with respect to the
841   corresponding validators contained within the selected response.
842   A cache MUST NOT evaluate conditional header fields that are only
843   applicable to an origin server, found in a request with semantics that
844   cannot be satisfied with a cached response, or applied to a target resource
845   for which it has no stored responses; such preconditions are likely
846   intended for some other (inbound) server.
847</t>
848<t>
849   The proper evaluation of conditional requests by a cache depends on the
850   received precondition header fields and their precedence, as defined in
851   Section 6 of <xref target="RFC7232"/>. The If-Match and
852   If-Unmodified-Since conditional header fields are not
853   applicable to a cache.
854</t>
855<t>
856   A request containing an If-None-Match header field
857   (Section 3.2 of <xref target="RFC7232"/>) indicates that the client wants to validate one
858   or more of its own stored responses in comparison to whichever stored
859   response is selected by the cache.
860   If the field-value is "*", or if the field-value is a list of entity-tags
861   and at least one of them matches the entity-tag of the selected stored
862   response, a cache recipient SHOULD generate a
863   304 (Not Modified) response (using the metadata of the
864   selected stored response) instead of sending that stored response.
865</t>
866<t>
867   When a cache decides to revalidate its own stored responses for a
868   request that contains an If-None-Match list of entity-tags,
869   the cache MAY combine the received list with a list of entity-tags
870   from its own stored set of responses (fresh or stale) and send the union of
871   the two lists as a replacement If-None-Match header
872   field value in the forwarded request.
873   If a stored response contains only partial content, the
874   cache MUST NOT include its entity-tag in the union unless the request is
875   for a range that would be fully satisfied by that partial stored response.
876   If the response to the forwarded request is
877   304 (Not Modified) and has an ETag header field value with
878   an entity-tag that is not in the client's list, the cache MUST
879   generate a 200 (OK) response for the client by reusing its
880   corresponding stored response, as updated by the 304 response metadata
881   (<xref target="freshening.responses"/>).
882</t>
883<t>
884   If an If-None-Match header field is not present, a request
885   containing an If-Modified-Since header field
886   (Section 3.3 of <xref target="RFC7232"/>) indicates that the client wants to validate
887   one or more of its own stored responses by modification date.
888   A cache recipient SHOULD generate a 304 (Not Modified)
889   response (using the metadata of the selected stored response) if one of the
890   following cases is true:
891   1) the selected stored response has a Last-Modified
892   field-value that is earlier than or equal to the conditional timestamp;
893   2) no Last-Modified field is present in the selected stored
894   response, but it has a Date field-value that is earlier than
895   or equal to the conditional timestamp; or,
896   3) neither Last-Modified nor Date is present
897   in the selected stored response, but the cache recorded it as having been
898   received at a time earlier than or equal to the conditional timestamp.
899</t>
900<t>
901   A cache that implements partial responses to range requests, as defined in
902   <xref target="RFC7233"/>, also needs to evaluate a received If-Range header
903   field (Section 3.2 of <xref target="RFC7233"/>) with respect to its selected stored response.
904</t>
905</section>
906
907<section anchor="validation.response" title="Handling a Validation Response">
908<t>
909   Cache handling of a response to a conditional request is dependent upon its
910   status code:
911</t>
912<t>
913   <list style="symbols">
914      <t>
915         A 304 (Not Modified) response status code indicates
916         that the stored response can be updated and reused; see <xref target="freshening.responses"/>.
917      </t>
918      <t>
919         A full response (i.e., one with a payload body) indicates that none
920         of the stored responses nominated in the conditional request is
921         suitable. Instead, the cache MUST use the full response to
922         satisfy the request and MAY replace the stored response(s).
923      </t>
924      <t>
925         However, if a cache receives a 5xx (Server Error)
926         response while attempting to validate a response, it can either
927         forward this response to the requesting client, or act as if the
928         server failed to respond. In the latter case, the cache MAY send a
929         previously stored response (see <xref target="serving.stale.responses"/>).
930      </t>
931   </list>
932</t>
933</section>
934
935<section anchor="freshening.responses" title="Freshening Stored Responses upon Validation">
936<t>
937   When a cache receives a 304 (Not Modified) response and
938   already has one or more stored 200 (OK) responses for the
939   same cache key, the cache needs to identify which of the stored responses
940   are updated by this new response and then update the stored response(s)
941   with the new information provided in the 304 response.
942</t>
943<iref item="strong validator"/>
944<t>
945   The stored response to update is identified by using the first match (if
946   any) of the following:
947   <list style="symbols">
948    <t>
949     If the new response contains a strong validator (see
950     Section 2.1 of <xref target="RFC7232"/>), then that strong validator identifies the selected
951     representation for update. All of the stored responses with the same
952     strong validator are selected. If none of the stored responses contain the
953     same strong validator, then the cache MUST NOT use the new response to
954     update any stored responses.
955    </t>
956    <t>
957     If the new response contains a weak validator and that validator
958     corresponds to one of the cache's stored responses, then the most
959     recent of those matching stored responses is selected for update.
960    </t>
961    <t>
962     If the new response does not include any form of validator (such as in
963     the case where a client generates an If-Modified-Since request from a
964     source other than the Last-Modified response header field), and there is
965     only one stored response, and that stored response also lacks a
966     validator, then that stored response is selected for update.
967    </t>
968   </list>
969</t>
970<t>
971   If a stored response is selected for update, the cache MUST:
972   <list style="symbols">
973      <t>delete any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
974         with warn-code 1xx (see <xref target="header.warning"/>);</t>
975      <t>retain any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
976         with warn-code 2xx; and,</t>
977      <t>use other header fields provided in the 304 (Not Modified)
978         response to replace all instances of the corresponding header
979         fields in the stored response.</t>
980   </list>
981</t>
982</section>
983
984<section anchor="head.effects" title="Freshening Responses via HEAD">
985<t>
986   A response to the HEAD method is identical to what an equivalent request
987   made with a GET would have been, except it lacks a body. This property
988   of HEAD responses can be used to invalidate or update a cached GET
989   response if the more efficient conditional GET request mechanism is not
990   available (due to no validators being present in the stored response) or
991   if transmission of the representation body is not desired even if it has
992   changed.
993</t>
994<t>
995   When a cache makes an inbound HEAD request for a given request target and
996   receives a 200 (OK) response, the cache SHOULD update or
997   invalidate each of its stored GET responses that could have been selected
998   for that request (see <xref target="caching.negotiated.responses"/>).
999</t>
1000<t>
1001   For each of the stored responses that could have been selected, if the
1002   stored response and HEAD response have matching values for any received
1003   validator fields (ETag and Last-Modified)
1004   and, if the HEAD response has a Content-Length header field,
1005   the value of Content-Length matches that of the stored
1006   response, the cache SHOULD update the stored response as described below;
1007   otherwise, the cache SHOULD consider the stored response to be stale.
1008</t>
1009<t>
1010   If a cache updates a stored response with the metadata provided in a HEAD
1011   response, the cache MUST:
1012   <list style="symbols">
1013      <t>delete any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
1014         with warn-code 1xx (see <xref target="header.warning"/>);</t>
1015      <t>retain any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
1016         with warn-code 2xx; and,</t>
1017      <t>use other header fields provided in the HEAD response to replace all
1018         instances of the corresponding header fields in the stored response
1019         and append new header fields to the stored response's header section
1020         unless otherwise restricted by the <xref target="header.cache-control" format="none">Cache-Control</xref>
1021         header field.</t>
1022   </list>
1023</t>
1024</section>
1025</section>
1026
1027
1028<section anchor="invalidation" title="Invalidation">
1029<t>
1030   Because unsafe request methods (Section 4.2.1 of <xref target="RFC7231"/>) such as PUT, POST or DELETE
1031   have the potential for changing state on the origin server, intervening
1032   caches can use them to keep their contents up to date.
1033</t>
1034<t>
1035   A cache MUST invalidate the effective Request URI
1036   (Section 5.5 of <xref target="RFC7230"/>) as well as the URI(s) in the
1037   Location and Content-Location response header
1038   fields (if present) when a non-error status code is received in response to
1039   an unsafe request method.
1040</t>
1041<t>
1042   However, a cache MUST NOT invalidate a URI from a Location
1043   or Content-Location response header field if the host part of
1044   that URI differs from the host part in the effective request URI
1045   (Section 5.5 of <xref target="RFC7230"/>). This helps prevent denial-of-service attacks.
1046</t>
1047<t>
1048   A cache MUST invalidate the effective request URI
1049   (Section 5.5 of <xref target="RFC7230"/>) when it receives a non-error response
1050   to a request with a method whose safety is unknown.
1051</t>
1052<t>
1053   Here, a "non-error response" is one with a 2xx (Successful)
1054   or 3xx (Redirection) status code. "Invalidate" means that
1055   the cache will either remove all stored responses related to the effective
1056   request URI or will mark these as "invalid" and in need of a mandatory
1057   validation before they can be sent in response to a subsequent request.
1058</t>
1059<t>
1060   Note that this does not guarantee that all appropriate responses are
1061   invalidated. For example, a state-changing request might invalidate
1062   responses in the caches it travels through, but relevant responses still
1063   might be stored in other caches that it has not.</t>
1064</section>
1065</section>
1066
1067
1068
1069<section anchor="header.field.definitions" title="Header Field Definitions">
1070<t>
1071   This section defines the syntax and semantics of HTTP/1.1 header fields
1072   related to caching.
1073</t>
1074
1075<section anchor="header.age" title="Age">
1076   <iref item="Age header field" primary="true"/>
1077   
1078   
1079<t>
1080   The "Age" header field conveys the sender's estimate of the amount
1081   of time since the response was generated or successfully validated at the
1082   origin server. Age values are calculated as specified in <xref target="age.calculations"/>.
1083</t>
1084<figure><iref primary="true" item="Grammar" subitem="Age"/><artwork type="abnf2616"><![CDATA[
1085  Age = delta-seconds
1086]]></artwork></figure>
1087<t>
1088   The Age field-value is a non-negative integer, representing time in seconds
1089   (see <xref target="delta-seconds"/>).
1090</t>
1091<t>
1092   The presence of an Age header field implies that the response was not
1093   generated or validated by the origin server for this request. However,
1094   lack of an Age header field does not imply the origin was contacted, since
1095   the response might have been received from an HTTP/1.0 cache that does not
1096   implement Age.
1097</t>
1098</section>
1099
1100<section anchor="header.cache-control" title="Cache-Control">
1101   <iref item="Cache-Control header field" primary="true"/>
1102   
1103   
1104<t>
1105   The "Cache-Control" header field is used to specify directives for
1106   caches along the request/response chain. Such cache directives are
1107   unidirectional in that the presence of a directive in a request does not
1108   imply that the same directive is to be given in the response.
1109</t>
1110<t>
1111   A cache MUST obey the requirements of the Cache-Control
1112   directives defined in this section. See <xref target="cache.control.extensions"/> for information about how Cache-Control
1113   directives defined elsewhere are handled.
1114</t>
1115<t><list>
1116   <t>
1117       Note: Some HTTP/1.0 caches might not implement Cache-Control.
1118   </t>
1119</list></t>
1120<t>
1121   A proxy, whether or not it implements a cache, MUST pass cache directives
1122   through in forwarded messages, regardless of their
1123   significance to that application, since the directives might be applicable
1124   to all recipients along the request/response chain. It is not possible to
1125   target a directive to a specific cache.
1126</t>
1127<t>
1128   Cache directives are identified by a token, to be compared case-insensitively,
1129   and have an optional argument, that can use both token and quoted-string
1130   syntax. For the directives defined below that define arguments, recipients
1131   ought to accept both forms, even if one is documented to be preferred. For
1132   any directive not defined by this specification, a recipient MUST accept
1133   both forms.
1134</t>
1135<figure><iref primary="true" item="Grammar" subitem="Cache-Control"/><iref primary="true" item="Grammar" subitem="cache-directive"/><artwork type="abnf2616"><![CDATA[
1136  Cache-Control   = 1#cache-directive
1137
1138  cache-directive = token [ "=" ( token / quoted-string ) ]
1139]]></artwork></figure>
1140<t>
1141   For the cache directives defined below, no argument is defined (nor allowed)
1142   unless stated otherwise.
1143</t>
1144
1145<section title="Request Cache-Control Directives" anchor="cache-request-directive">
1146
1147<section title="max-age" anchor="cache-request-directive.max-age">
1148   <iref item="max-age (cache directive)" primary="true"/>
1149<t>
1150   Argument syntax:
1151   <list>
1152      <t>
1153        <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)
1154      </t>
1155   </list>
1156</t>
1157<t>
1158   The "max-age" request directive indicates that the client is unwilling
1159   to accept a response whose age is greater than the specified number of
1160   seconds. Unless the max-stale request directive is also present, the client
1161   is not willing to accept a stale response.
1162</t>
1163<t>
1164   This directive uses the token form of the argument syntax:
1165   e.g., 'max-age=5' not 'max-age="5"'. A sender SHOULD NOT generate the
1166   quoted-string form.
1167</t>
1168</section>
1169
1170<section title="max-stale" anchor="cache-request-directive.max-stale">
1171   <iref item="max-stale (cache directive)" primary="true"/>
1172<t>
1173   Argument syntax:
1174   <list>
1175      <t>
1176        <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)
1177      </t>
1178   </list>
1179</t>
1180<t>
1181   The "max-stale" request directive indicates that the client is willing
1182   to accept a response that has exceeded its freshness lifetime. If max-stale
1183   is assigned a value, then the client is willing to accept a response
1184   that has exceeded its freshness lifetime by no more than the specified
1185   number of seconds. If no value is assigned to max-stale, then the client
1186   is willing to accept a stale response of any age.
1187</t>
1188<t>
1189   This directive uses the token form of the argument syntax:
1190   e.g., 'max-stale=10' not 'max-stale="10"'. A sender SHOULD NOT generate
1191   the quoted-string form.
1192</t>
1193</section>
1194
1195<section title="min-fresh" anchor="cache-request-directive.min-fresh">
1196   <iref item="min-fresh (cache directive)" primary="true"/>
1197<t>
1198   Argument syntax:
1199   <list>
1200      <t>
1201        <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)
1202      </t>
1203   </list>
1204</t>
1205<t>
1206   The "min-fresh" request directive indicates that the client is willing
1207   to accept a response whose freshness lifetime is no less than its
1208   current age plus the specified time in seconds. That is, the client
1209   wants a response that will still be fresh for at least the specified
1210   number of seconds.
1211</t>
1212<t>
1213   This directive uses the token form of the argument syntax;
1214   e.g., 'min-fresh=20', not 'min-fresh="20"'. A sender SHOULD NOT generate
1215   the quoted-string form.
1216</t>
1217</section>
1218
1219<section title="no-cache" anchor="cache-request-directive.no-cache">
1220   <iref item="no-cache (cache directive)" primary="true"/>
1221<t>
1222   The "no-cache" request directive indicates that a cache MUST NOT
1223   use a stored response to satisfy the request without successful
1224   validation on the origin server.
1225</t>
1226</section>
1227 
1228<section title="no-store" anchor="cache-request-directive.no-store">
1229   <iref item="no-store (cache directive)" primary="true"/>
1230<t>
1231   The "no-store" request directive indicates that a cache MUST NOT
1232   store any part of either this request or any response to it. This
1233   directive applies to both private and shared caches. "MUST NOT
1234   store" in this context means that the cache MUST NOT intentionally
1235   store the information in non-volatile storage, and MUST make a
1236   best-effort attempt to remove the information from volatile storage as
1237   promptly as possible after forwarding it.
1238</t>
1239<t>
1240   This directive is NOT a reliable or sufficient mechanism for ensuring
1241   privacy. In particular, malicious or compromised caches might not
1242   recognize or obey this directive, and communications networks might be
1243   vulnerable to eavesdropping.
1244</t>
1245<t>
1246   Note that if a request containing this directive is satisfied from a
1247   cache, the no-store request directive does not apply to the already
1248   stored response.
1249</t>
1250</section>
1251
1252<section title="no-transform" anchor="cache-request-directive.no-transform">
1253   <iref item="no-transform (cache directive)" primary="true"/>
1254<t>
1255   The "no-transform" request directive indicates that an intermediary
1256   (whether or not it implements a cache) MUST NOT transform the payload,
1257   as defined in Section 5.7.2 of <xref target="RFC7230"/>.
1258</t>
1259</section>
1260
1261<section title="only-if-cached" anchor="cache-request-directive.only-if-cached">
1262   <iref item="only-if-cached (cache directive)" primary="true"/>
1263<t>
1264   The "only-if-cached" request directive indicates that the client only wishes
1265   to obtain a stored response. If it receives this directive, a cache SHOULD
1266   either respond using a stored response that is consistent with the other
1267   constraints of the request, or respond with a 504 (Gateway
1268   Timeout) status code. If a group of caches is being operated as a
1269   unified system with good internal connectivity, a member cache MAY
1270   forward such a request within that group of caches.
1271</t>
1272</section>
1273</section>
1274
1275<section anchor="cache-response-directive" title="Response Cache-Control Directives">
1276   
1277
1278<section title="must-revalidate" anchor="cache-response-directive.must-revalidate">
1279   <iref item="must-revalidate (cache directive)" primary="true"/>
1280<t>
1281   The "must-revalidate" response directive indicates that once it has
1282   become stale, a cache MUST NOT use the response to satisfy subsequent
1283   requests without successful validation on the origin server.
1284</t>
1285<t>
1286   The must-revalidate directive is necessary to support reliable
1287   operation for certain protocol features. In all circumstances a
1288   cache MUST obey the must-revalidate directive; in particular,
1289   if a cache cannot reach the origin server for any reason, it MUST
1290   generate a 504 (Gateway Timeout) response.
1291</t>
1292<t>
1293   The must-revalidate directive ought to be used by servers if and only
1294   if failure to validate a request on the representation could result in
1295   incorrect operation, such as a silently unexecuted financial
1296   transaction.
1297</t>
1298</section>
1299
1300<section title="no-cache" anchor="cache-response-directive.no-cache">
1301   <iref item="no-cache (cache directive)" primary="true"/>
1302<t>
1303   Argument syntax:
1304   <list>
1305      <t>
1306        #<xref target="imported.abnf" format="none">field-name</xref>
1307      </t>
1308   </list>
1309</t>
1310<t>
1311   The "no-cache" response directive indicates that the response MUST NOT
1312   be used to satisfy a subsequent request without successful validation on
1313   the origin server. This allows an origin server to prevent a cache from
1314   using it to satisfy a request without contacting it, even by caches that
1315   have been configured to send stale responses.
1316</t>
1317<t>
1318   If the no-cache response directive specifies one or more field-names,
1319   then a cache MAY use the response to satisfy a subsequent request,
1320   subject to any other restrictions on caching. However, any header fields
1321   in the response that have the field-name(s) listed MUST NOT be sent
1322   in the response to a subsequent request without successful revalidation
1323   with the origin server. This allows an origin server to prevent the
1324   re-use of certain header fields in a response, while still allowing
1325   caching of the rest of the response.
1326</t>
1327<t>
1328   The field-names given are not limited to the set of header
1329   fields defined by this specification. Field names are case-insensitive.
1330</t>
1331<t>
1332   This directive uses the quoted-string form of the argument syntax.
1333   A sender SHOULD NOT generate the token form (even if quoting appears not
1334   to be needed for single-entry lists).
1335</t>
1336<t>
1337   Note: Although it has been back-ported to many implementations, some
1338   HTTP/1.0 caches will not recognize or obey this directive. Also, no-cache
1339   response directives with field-names are often handled by caches
1340   as if an unqualified no-cache directive was received; i.e., the special
1341   handling for the qualified form is not widely implemented.
1342</t>
1343</section>
1344
1345<section title="no-store" anchor="cache-response-directive.no-store">
1346   <iref item="no-store (cache directive)" primary="true"/>
1347<t>
1348   The "no-store" response directive indicates that a cache MUST NOT
1349   store any part of either the immediate request or response. This
1350   directive applies to both private and shared caches. "MUST NOT
1351   store" in this context means that the cache MUST NOT intentionally
1352   store the information in non-volatile storage, and MUST make a
1353   best-effort attempt to remove the information from volatile storage as
1354   promptly as possible after forwarding it.
1355</t>
1356<t>
1357   This directive is NOT a reliable or sufficient mechanism for ensuring
1358   privacy. In particular, malicious or compromised caches might not
1359   recognize or obey this directive, and communications networks might be
1360   vulnerable to eavesdropping.
1361</t>
1362</section>
1363
1364<section title="no-transform" anchor="cache-response-directive.no-transform">
1365   <iref item="no-transform (cache directive)" primary="true"/>
1366<t>
1367   The "no-transform" response directive indicates that an intermediary
1368   (regardless of whether it implements a cache) MUST NOT transform the
1369   payload, as defined in Section 5.7.2 of <xref target="RFC7230"/>.
1370</t>
1371</section>
1372
1373<section title="public" anchor="cache-response-directive.public">
1374   <iref item="public (cache directive)" primary="true"/>
1375<t>
1376   The "public" response directive indicates that any cache MAY store the
1377   response, even if the response would normally be non-cacheable or cacheable
1378   only within a private cache. (See <xref target="caching.authenticated.responses"/> for additional details related to
1379   the use of public in response to a request containing
1380   Authorization, and <xref target="response.cacheability"/> for
1381   details of how public affects responses that would normally not be stored,
1382   due to their status codes not being defined as cacheable by default; see
1383   <xref target="heuristic.freshness"/>.)
1384</t>
1385</section>
1386
1387<section title="private" anchor="cache-response-directive.private">
1388   <iref item="private (cache directive)" primary="true"/>
1389<t>
1390   Argument syntax:
1391   <list>
1392      <t>
1393        #<xref target="imported.abnf" format="none">field-name</xref>
1394      </t>
1395   </list>
1396</t>
1397<t>
1398   The "private" response directive indicates that the response message is
1399   intended for a single user and MUST NOT be stored by a shared cache. A
1400   private cache MAY store the response and reuse it for later requests,
1401   even if the response would normally be non-cacheable.
1402</t>
1403<t>
1404   If the private response directive specifies one or more field-names,
1405   this requirement is limited to the field-values associated with the
1406   listed response header fields. That is, a shared cache MUST NOT store
1407   the specified field-names(s), whereas it MAY store the remainder of the
1408   response message.
1409</t>
1410<t>
1411   The field-names given are not limited to the set of header
1412   fields defined by this specification. Field names are case-insensitive.
1413</t>
1414<t>
1415   This directive uses the quoted-string form of the argument syntax.
1416   A sender SHOULD NOT generate the token form (even if quoting appears not
1417   to be needed for single-entry lists).
1418</t>
1419<t>
1420   Note: This use of the word "private" refers only to the control
1421   of the location in which the response can be stored; the privacy of the
1422   message content cannot be ensured. Also, private response directives with field-names are
1423   often handled by caches as if an unqualified private directive
1424   was received; i.e., the special handling for the qualified form is not
1425   widely implemented.
1426</t>
1427</section>
1428
1429<section title="proxy-revalidate" anchor="cache-response-directive.proxy-revalidate">
1430   <iref item="proxy-revalidate (cache directive)" primary="true"/>
1431<t>
1432   The "proxy-revalidate" response directive has the same meaning as the
1433   must-revalidate response directive, except that it does not apply to
1434   private caches.
1435</t>
1436</section>
1437
1438<section title="max-age" anchor="cache-response-directive.max-age">
1439   <iref item="max-age (cache directive)" primary="true"/>
1440<t>
1441   Argument syntax:
1442   <list>
1443      <t>
1444        <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)
1445      </t>
1446   </list>
1447</t>
1448<t>
1449   The "max-age" response directive indicates that the response is to be
1450   considered stale after its age is greater than the specified number of
1451   seconds.
1452</t>
1453<t>
1454   This directive uses the token form of the argument syntax:
1455   e.g., 'max-age=5' not 'max-age="5"'. A sender SHOULD NOT generate the
1456   quoted-string form.
1457</t>
1458</section>     
1459
1460<section title="s-maxage" anchor="cache-response-directive.s-maxage">
1461   <iref item="s-maxage (cache directive)" primary="true"/>
1462<t>
1463   Argument syntax:
1464   <list>
1465      <t>
1466        <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)
1467      </t>
1468   </list>
1469</t>
1470<t>
1471   The "s-maxage" response directive indicates that, in shared caches, the
1472   maximum age specified by this directive overrides the maximum age
1473   specified by either the max-age directive or the <xref target="header.expires" format="none">Expires</xref>
1474   header field. The s-maxage directive also implies the semantics of the
1475   proxy-revalidate response directive.
1476</t>
1477<t>
1478   This directive uses the token form of the argument syntax:
1479   e.g., 's-maxage=10' not 's-maxage="10"'. A sender SHOULD NOT generate
1480   the quoted-string form.
1481</t>
1482</section>
1483
1484</section>
1485
1486<section anchor="cache.control.extensions" title="Cache Control Extensions">
1487<t>
1488   The Cache-Control header field can be extended through the use of one or
1489   more cache-extension tokens, each with an optional value.
1490   A cache MUST ignore unrecognized cache directives.
1491</t>
1492<t>
1493   Informational extensions (those that do not require a change in cache
1494   behavior) can be added without changing the semantics of other directives.
1495</t>
1496<t>  
1497   Behavioral extensions are designed to work by acting as modifiers to the
1498   existing base of cache directives.
1499   Both the new directive and the old directive are supplied, such that
1500   applications that do not understand the new directive will default to the
1501   behavior specified by the old directive, and those that understand the
1502   new directive will recognize it as modifying the requirements associated
1503   with the old directive. In this way, extensions to the existing
1504   cache-control directives can be made without breaking deployed caches.
1505</t>
1506<t>
1507   For example, consider a hypothetical new response directive called
1508   "community" that acts as a modifier to the private directive: in addition
1509   to private caches, any cache that is shared only by members of the named
1510   community is allowed to cache the response. An origin server wishing to
1511   allow the UCI community to use an otherwise private response in their
1512   shared cache(s) could do so by including
1513
1514<!--[rfced] Please let us know if/how we may expand "UCI".
1515
1516-->
1517</t>
1518<figure><artwork type="example"><![CDATA[
1519  Cache-Control: private, community="UCI"
1520]]></artwork></figure>
1521<t>
1522   A cache that recognizes such a community cache-extension could broaden its
1523   behavior in accordance with that extension.  A cache that does not
1524   recognize the community cache-extension would ignore it and adhere to the
1525   private directive.
1526</t>
1527</section>
1528
1529</section>
1530
1531<section anchor="header.expires" title="Expires">
1532   <iref item="Expires header field" primary="true"/>
1533   
1534<t>
1535   The "Expires" header field gives the date/time after which the
1536   response is considered stale. See <xref target="expiration.model"/> for
1537   further discussion of the freshness model.
1538</t>
1539<t>
1540   The presence of an Expires field does not imply that the original resource
1541   will change or cease to exist at, before, or after that time.
1542</t>
1543<t>
1544   The Expires value is an HTTP-date timestamp, as defined in Section 7.1.1.1 of <xref target="RFC7231"/>.
1545</t>
1546<figure><iref primary="true" item="Grammar" subitem="Expires"/><artwork type="abnf2616"><![CDATA[
1547  Expires = HTTP-date
1548]]></artwork></figure>
1549<figure>
1550  <preamble>For example</preamble>
1551<artwork type="example"><![CDATA[
1552  Expires: Thu, 01 Dec 1994 16:00:00 GMT
1553]]></artwork></figure>
1554<t>
1555   A cache recipient MUST interpret invalid date formats, especially the
1556   value "0", as representing a time in the past (i.e., "already expired").
1557</t>
1558<t>
1559   If a response includes a <xref target="header.cache-control" format="none">Cache-Control</xref> field with
1560   the max-age directive (<xref target="cache-response-directive.max-age"/>),
1561   a recipient MUST ignore the Expires field.
1562   Likewise, if a response includes the s-maxage directive
1563   (<xref target="cache-response-directive.s-maxage"/>), a shared cache
1564   recipient MUST ignore the Expires field. In both these cases, the value
1565   in Expires is only intended for recipients that have not yet implemented
1566   the Cache-Control field.
1567</t>
1568<t>
1569   An origin server without a clock MUST NOT generate an Expires field
1570   unless its value represents a fixed time in the past (always expired)
1571   or its value has been associated with the resource by a system or user
1572   with a reliable clock.
1573</t>
1574<t>
1575   Historically, HTTP required the Expires field-value to be no more than a
1576   year in the future. While longer freshness lifetimes are no longer
1577   prohibited, extremely large values have been demonstrated to cause
1578   problems (e.g., clock overflows due to use of 32-bit integers for
1579   time values), and many caches will evict a response far sooner than
1580   that.
1581</t>
1582</section>
1583
1584<section anchor="header.pragma" title="Pragma">
1585   <iref item="Pragma header field" primary="true"/>
1586   
1587   
1588   
1589<t>
1590   The "Pragma" header field allows backwards compatibility with HTTP/1.0
1591   caches, so that clients can specify a "no-cache" request that they will
1592   understand (as <xref target="header.cache-control" format="none">Cache-Control</xref> was not defined until HTTP/1.1).
1593   When the Cache-Control header field is also present and understood in a
1594   request, Pragma is ignored.
1595</t>
1596<t>
1597   In HTTP/1.0, Pragma was defined as an extensible field for
1598   implementation-specified directives for recipients. This specification
1599   deprecates such extensions to improve interoperability.
1600</t>
1601<figure><iref primary="true" item="Grammar" subitem="Pragma"/><iref primary="true" item="Grammar" subitem="pragma-directive"/><iref primary="true" item="Grammar" subitem="extension-pragma"/><artwork type="abnf2616"><![CDATA[
1602  Pragma           = 1#pragma-directive
1603  pragma-directive = "no-cache" / extension-pragma
1604  extension-pragma = token [ "=" ( token / quoted-string ) ]
1605]]></artwork></figure>
1606<t>
1607   When the <xref target="header.cache-control" format="none">Cache-Control</xref> header field is not present in a
1608   request, caches MUST consider the no-cache request pragma-directive as
1609   having the same effect as if "Cache-Control: no-cache" were present (see
1610   <xref target="cache-request-directive"/>).
1611</t>
1612<t>
1613   When sending a no-cache request, a client ought to include both the pragma
1614   and cache-control directives, unless Cache-Control: no-cache is
1615   purposefully omitted to target other <xref target="header.cache-control" format="none">Cache-Control</xref> response
1616   directives at HTTP/1.1 caches. For example:
1617</t>
1618<figure>
1619<artwork type="message/http; msgtype=&#34;response&#34;"><![CDATA[
1620  GET / HTTP/1.1
1621  Host: www.example.com
1622  Cache-Control: max-age=30
1623  Pragma: no-cache
1624 
1625  ]]></artwork>
1626</figure>
1627<t>
1628   will constrain HTTP/1.1 caches to serve a response no older than 30
1629   seconds, while precluding implementations that do not understand
1630   <xref target="header.cache-control" format="none">Cache-Control</xref> from serving a cached response.
1631</t>
1632<t><list>
1633   <t>
1634      Note: Because the meaning of "Pragma: no-cache" in responses is not
1635      specified, it does not provide a reliable replacement for
1636      "Cache-Control: no-cache" in them.
1637   </t>
1638</list></t>
1639</section>
1640
1641<section anchor="header.warning" title="Warning">
1642   <iref item="Warning header field" primary="true"/>
1643   
1644   
1645   
1646   
1647   
1648   
1649<t>
1650   The "Warning" header field is used to carry additional information
1651   about the status or transformation of a message that might not be reflected
1652   in the status code. This information is typically used to warn about possible
1653   incorrectness introduced by caching operations or transformations applied
1654   to the payload of the message.
1655</t>
1656<t>
1657   Warnings can be used for other purposes, both cache-related and otherwise.
1658   The use of a warning, rather than an error status code, distinguishes these
1659   responses from true failures.
1660</t>
1661<t>
1662   Warning header fields can in general be applied to any message, however some
1663   warn-codes are specific to caches and can only be applied to response
1664   messages.
1665</t>
1666<figure><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"/><artwork type="abnf2616"><![CDATA[
1667  Warning       = 1#warning-value
1668 
1669  warning-value = warn-code SP warn-agent SP warn-text
1670                                        [ SP warn-date ]
1671 
1672  warn-code  = 3DIGIT
1673  warn-agent = ( uri-host [ ":" port ] ) / pseudonym
1674                  ; the name or pseudonym of the server adding
1675                  ; the Warning header field, for use in debugging
1676                  ; a single "-" is recommended when agent unknown
1677  warn-text  = quoted-string
1678  warn-date  = DQUOTE HTTP-date DQUOTE
1679]]></artwork></figure>
1680<t>
1681   Multiple warnings can be generated in a response (either by the origin
1682   server or by a cache), including multiple warnings with the same warn-code
1683   number that only differ in warn-text.
1684</t>
1685<t>
1686   A user agent that receives one or more Warning header fields SHOULD
1687   inform the user of as many of them as possible, in the order that they
1688   appear in the response. Senders that generate multiple Warning header
1689   fields are encouraged to order them with this user agent behavior in mind.
1690   A sender that generates new Warning header fields MUST append them after
1691   any existing Warning header fields.
1692</t>
1693<t>
1694   Warnings are assigned three digit warn-codes. The first digit indicates
1695   whether the Warning is required to be deleted from a stored response after
1696   validation:
1697   <list style="symbols">
1698      <t>1xx warn-codes describe the freshness or validation status of the
1699      response, and so they MUST be deleted by a cache after validation. They can
1700      only be generated by a cache when validating a cached entry, and
1701      MUST NOT be generated in any other situation.</t>
1702      <t>2xx warn-codes describe some aspect of the representation that is not
1703      rectified by a validation (for example, a lossy compression of the
1704      representation) and they MUST NOT be deleted by a cache after validation,
1705      unless a full response is sent, in which case they MUST be.</t>
1706   </list>
1707</t>
1708<t>
1709   If a sender generates one or more 1xx warn-codes in a message to be
1710   sent to a recipient known to implement only HTTP/1.0, the sender MUST
1711   include in each corresponding warning-value a warn-date that matches the
1712   Date header field in the message. For example:
1713</t>
1714<figure><artwork type="message/http; msgtype=&#34;response&#34;"><![CDATA[
1715  HTTP/1.1 200 OK
1716  Date: Sat, 25 Aug 2012 23:34:45 GMT
1717  Warning: 112 - "network down" "Sat, 25 Aug 2012 23:34:45 GMT"
1718 
1719  ]]></artwork></figure>
1720<t>
1721  Warnings have accompanying warn-text that describes the error, e.g., for
1722  logging. It is advisory only, and its content does not affect interpretation
1723  of the warn-code.
1724</t>
1725<t>
1726   If a recipient that uses, evaluates, or displays Warning header fields
1727   receives a warn-date that is different from the Date value
1728   in the same message, the recipient MUST exclude the warning-value
1729   containing that warn-date before storing, forwarding, or using the message.
1730   This allows recipients to exclude warning-values that were improperly
1731   retained after a cache validation.
1732   If all of the warning-values are excluded, the recipient MUST exclude
1733   the Warning header field as well.
1734</t>
1735<t>
1736   The following warn-codes are defined by this specification, each with a
1737   recommended warn-text in English, and a description of its meaning.
1738   The procedure for defining additional warn codes is described in
1739   <xref target="warn.code.registry.procedure"/>.
1740</t>
1741
1742<section title="Warning: 110 - &#34;Response is Stale&#34;" anchor="warn.110">
1743  <iref primary="true" item="110 (warn-code)"/>
1744  <iref primary="true" item="Response is Stale (warn-text)"/>
1745<t>
1746   A cache SHOULD generate this whenever the sent response is stale.
1747</t>
1748</section>
1749
1750<section title="Warning: 111 - &#34;Revalidation Failed&#34;" anchor="warn.111">
1751  <iref primary="true" item="111 (warn-code)"/>
1752  <iref primary="true" item="Revalidation Failed (warn-text)"/>
1753<t>
1754   A cache SHOULD generate this when sending a stale response because an
1755   attempt to validate the response failed, due to an inability to reach
1756   the server.
1757</t>
1758</section>
1759
1760<section title="Warning: 112 - &#34;Disconnected Operation&#34;" anchor="warn.112">
1761  <iref primary="true" item="112 (warn-code)"/>
1762  <iref primary="true" item="Disconnected Operation (warn-text)"/>
1763<t>
1764   A cache SHOULD generate this if it is intentionally disconnected from
1765   the rest of the network for a period of time.
1766</t>
1767</section>
1768
1769<section title="Warning: 113 - &#34;Heuristic Expiration&#34;" anchor="warn.113">
1770  <iref primary="true" item="113 (warn-code)"/>
1771  <iref primary="true" item="Heuristic Expiration (warn-text)"/>
1772<t>
1773   A cache SHOULD generate this if it heuristically chose a freshness
1774   lifetime greater than 24 hours and the response's age is greater than 24
1775   hours.
1776</t>
1777</section>
1778
1779<section title="Warning: 199 - &#34;Miscellaneous Warning&#34;" anchor="warn.199">
1780  <iref primary="true" item="199 (warn-code)"/>
1781  <iref primary="true" item="Miscellaneous Warning (warn-text)"/>
1782<t>
1783   The warning text can include arbitrary information to be presented to
1784   a human user or logged. A system receiving this warning MUST NOT take
1785   any automated action, besides presenting the warning to the user.
1786</t>
1787</section>
1788
1789<section title="Warning: 214 - &#34;Transformation Applied&#34;" anchor="warn.214">
1790  <iref primary="true" item="214 (warn-code)"/>
1791  <iref primary="true" item="Transformation Applied (warn-text)"/>
1792<t>
1793   This Warning code MUST be added by a proxy if it applies any transformation to the
1794   representation, such as changing the content-coding, media-type, or
1795   modifying the representation data, unless this Warning code already appears
1796   in the response.
1797</t>
1798</section>
1799
1800<section title="Warning: 299 - &#34;Miscellaneous Persistent Warning&#34;" anchor="warn.299">
1801  <iref primary="true" item="299 (warn-code)"/>
1802  <iref primary="true" item="Miscellaneous Persistent Warning (warn-text)"/>
1803<t>
1804   The warning text can include arbitrary information to be presented to
1805   a human user or logged. A system receiving this warning MUST NOT take
1806   any automated action.
1807</t>
1808</section>
1809</section>
1810</section>
1811
1812<section anchor="history.lists" title="History Lists">
1813<t>
1814   User agents often have history mechanisms, such as "Back" buttons and
1815   history lists, that can be used to redisplay a representation retrieved
1816   earlier in a session.
1817</t>
1818<t>
1819   The freshness model (<xref target="expiration.model"/>) does not
1820   necessarily apply to history mechanisms.  That is, a history mechanism can
1821   display a previous representation even if it has expired.
1822</t>
1823<t>
1824   This does not prohibit the history mechanism from telling the user that a
1825   view might be stale or from honoring cache directives (e.g.,
1826   Cache-Control: no-store).
1827</t>
1828</section>
1829
1830
1831<section title="IANA Considerations" anchor="iana.considerations">
1832
1833<section title="Cache Directive Registry" anchor="cache.directive.registry">
1834<t>
1835   The "HTTP Cache Directive Registry" defines the name space for the
1836   cache directives. It has been created and is now maintained at
1837   &lt;http://www.iana.org/assignments/http-cache-directives&gt;.
1838</t>
1839
1840<section title="Procedure" anchor="cache.directive.registry.procedure">
1841<t>
1842   A registration MUST include the following fields:
1843   <list style="symbols">
1844      <t>Cache Directive Name</t>
1845      <t>Pointer to specification text</t>
1846   </list>
1847</t>
1848<t>
1849   Values to be added to this name space require IETF Review (see <xref target="RFC5226"/>, Section 4.1).
1850</t>
1851</section>
1852
1853<section title="Considerations for New Cache Control Directives" anchor="cache.directive.considerations">
1854<t>
1855   New extension directives ought to consider defining:
1856</t>
1857<t>
1858   <list style="symbols">
1859      <t>What it means for a directive to be specified multiple times,</t>
1860      <t>When the directive does not take an argument, what it means when an
1861      argument is present,</t>
1862      <t>When the directive requires an argument, what it means when it is
1863      missing,</t>
1864      <t>Whether the directive is specific to requests, responses, or able
1865        to be used in either.</t>
1866   </list>
1867</t>
1868<t>
1869  See also <xref target="cache.control.extensions"/>.
1870</t>
1871</section>
1872
1873<section title="Registrations" anchor="cache.directive.registration">
1874<t>
1875  The "HTTP Cache Directive Registry" shall be populated with the registrations below:
1876</t>
1877
1878<texttable align="left" suppress-title="true" anchor="iana.cache.directive.registration.table">
1879   <ttcol>Cache Directive</ttcol>
1880   <ttcol>Reference</ttcol>
1881
1882   <c>max-age</c>
1883   <c>
1884      <xref target="cache-request-directive.max-age"/>, <xref target="cache-response-directive.max-age"/>
1885   </c>
1886   <c>max-stale</c>
1887   <c>
1888      <xref target="cache-request-directive.max-stale"/>
1889   </c>
1890   <c>min-fresh</c>
1891   <c>
1892      <xref target="cache-request-directive.min-fresh"/>
1893   </c>
1894   <c>must-revalidate</c>
1895   <c>
1896      <xref target="cache-response-directive.must-revalidate"/>
1897   </c>
1898   <c>no-cache</c>
1899   <c>
1900      <xref target="cache-request-directive.no-cache"/>, <xref target="cache-response-directive.no-cache"/>
1901   </c>
1902   <c>no-store</c>
1903   <c>
1904      <xref target="cache-request-directive.no-store"/>, <xref target="cache-response-directive.no-store"/>
1905   </c>
1906   <c>no-transform</c>
1907   <c>
1908      <xref target="cache-request-directive.no-transform"/>, <xref target="cache-response-directive.no-transform"/>
1909   </c>
1910   <c>only-if-cached</c>
1911   <c>
1912      <xref target="cache-request-directive.only-if-cached"/>
1913   </c>
1914   <c>private</c>
1915   <c>
1916      <xref target="cache-response-directive.private"/>
1917   </c>
1918   <c>proxy-revalidate</c>
1919   <c>
1920      <xref target="cache-response-directive.proxy-revalidate"/>
1921   </c>
1922   <c>public</c>
1923   <c>
1924      <xref target="cache-response-directive.public"/>
1925   </c>
1926   <c>s-maxage</c>
1927   <c>
1928      <xref target="cache-response-directive.s-maxage"/>
1929   </c>
1930   <c>stale-if-error</c>
1931   <c>
1932      <xref target="RFC5861"/>, Section 4
1933   </c>
1934   <c>stale-while-revalidate</c>
1935   <c>
1936      <xref target="RFC5861"/>, Section 3
1937   </c>
1938</texttable>
1939<!--(END)-->
1940
1941</section>
1942</section>
1943
1944<section title="Warn Code Registry" anchor="warn.code.registry">
1945<t>
1946   The "HTTP Warn Codes" registry defines the name space for warn codes.
1947   It has been created and is now maintained at
1948   &lt;http://www.iana.org/assignments/http-warn-codes&gt;.
1949</t>
1950
1951<section title="Procedure" anchor="warn.code.registry.procedure">
1952<t>
1953   A registration MUST include the following fields:
1954   <list style="symbols">
1955      <t>Warn Code (3 digits)</t>
1956      <t>Short Description</t>
1957      <t>Pointer to specification text</t>
1958   </list>
1959</t>
1960<t>
1961   Values to be added to this name pace require IETF Review (see <xref target="RFC5226"/>, Section 4.1).
1962</t>
1963</section>
1964
1965<section title="Registrations" anchor="warn.code.registration">
1966<t>
1967  The "HTTP Warn Codes" registry has been populated with the registrations below:
1968</t>
1969
1970<texttable align="left" suppress-title="true" anchor="iana.warn.code.registration.table">
1971   <ttcol>Warn Code</ttcol>
1972   <ttcol>Short Description</ttcol>
1973   <ttcol>Reference</ttcol>
1974   <c>110</c>
1975   <c>Response is Stale</c>
1976   <c>
1977      <xref target="warn.110"/>
1978   </c>
1979   <c>111</c>
1980   <c>Revalidation Failed</c>
1981   <c>
1982      <xref target="warn.111"/>
1983   </c>
1984   <c>112</c>
1985   <c>Disconnected Operation</c>
1986   <c>
1987      <xref target="warn.112"/>
1988   </c>
1989   <c>113</c>
1990   <c>Heuristic Expiration</c>
1991   <c>
1992      <xref target="warn.113"/>
1993   </c>
1994   <c>199</c>
1995   <c>Miscellaneous Warning</c>
1996   <c>
1997      <xref target="warn.199"/>
1998   </c>
1999   <c>214</c>
2000   <c>Transformation Applied</c>
2001   <c>
2002      <xref target="warn.214"/>
2003   </c>
2004   <c>299</c>
2005   <c>Miscellaneous Persistent Warning</c>
2006   <c>
2007      <xref target="warn.299"/>
2008   </c>
2009</texttable>
2010
2011</section>
2012</section>
2013
2014<section title="Header Field Registration" anchor="header.field.registration">
2015<t>
2016   HTTP header fields are registered within the Message Header Field Registry
2017   maintained at
2018   &lt;http://www.iana.org/assignments/message-headers&gt;.
2019</t>
2020<t>
2021   This document defines the following HTTP header fields, so their
2022   associated registry entries have been updated according to the permanent
2023   registrations below (see <xref target="BCP90"/>):
2024</t>
2025
2026<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
2027   <ttcol>Header Field Name</ttcol>
2028   <ttcol>Protocol</ttcol>
2029   <ttcol>Status</ttcol>
2030   <ttcol>Reference</ttcol>
2031
2032   <c>Age</c>
2033   <c>http</c>
2034   <c>standard</c>
2035   <c>
2036      <xref target="header.age"/>
2037   </c>
2038   <c>Cache-Control</c>
2039   <c>http</c>
2040   <c>standard</c>
2041   <c>
2042      <xref target="header.cache-control"/>
2043   </c>
2044   <c>Expires</c>
2045   <c>http</c>
2046   <c>standard</c>
2047   <c>
2048      <xref target="header.expires"/>
2049   </c>
2050   <c>Pragma</c>
2051   <c>http</c>
2052   <c>standard</c>
2053   <c>
2054      <xref target="header.pragma"/>
2055   </c>
2056   <c>Warning</c>
2057   <c>http</c>
2058   <c>standard</c>
2059   <c>
2060      <xref target="header.warning"/>
2061   </c>
2062</texttable>
2063
2064<t>
2065   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task
2066   Force".
2067</t>
2068</section>
2069</section>
2070
2071<section anchor="security.considerations" title="Security Considerations">
2072<t>
2073   This section is meant to inform developers, information providers, and
2074   users of known security concerns specific to HTTP caching.
2075   More general security considerations are addressed in HTTP messaging
2076   <xref target="RFC7230"/> and semantics <xref target="RFC7231"/>.
2077
2078</t>
2079<t>
2080   Caches expose additional potential vulnerabilities, since the contents of
2081   the cache represent an attractive target for malicious exploitation.
2082   Because cache contents persist after an HTTP request is complete, an attack
2083   on the cache can reveal information long after a user believes that the
2084   information has been removed from the network. Therefore, cache contents
2085   need to be protected as sensitive information.
2086</t>
2087<t>
2088   In particular, various attacks might be amplified by being stored in a
2089   shared cache; such "cache poisoning" attacks use the cache to distribute a
2090   malicious payload to many clients, and are especially effective when an
2091   attacker can use implementation flaws, elevated privileges, or other
2092   techniques to insert such a response into a cache. One common attack vector
2093   for cache poisoning is to exploit differences in message parsing on proxies
2094   and in user agents; see Section 3.3.3 of <xref target="RFC7230"/> for the relevant requirements.
2095</t>
2096<t>
2097   Likewise, implementation flaws (as well as misunderstanding of cache
2098   operation) might lead to caching of sensitive information (e.g.,
2099   authentication credentials) that is thought to be private, exposing it to
2100   unauthorized parties.
2101</t>
2102<t>
2103   Furthermore, the very use of a cache can bring about privacy concerns. For
2104   example, if two users share a cache, and the first one browses to a site,
2105   the second may be able to detect that the other has been to that site,
2106   because the resources from it load more quickly, thanks to the cache.
2107</t>
2108<t>
2109   Note that the Set-Cookie response header field <xref target="RFC6265"/> does not
2110   inhibit caching; a cacheable response with a Set-Cookie header field can be (and
2111   often is) used to satisfy subsequent requests to caches. Servers who wish
2112   to control caching of these responses are encouraged to emit appropriate
2113   Cache-Control response header fields.
2114</t>
2115
2116</section>
2117
2118<section title="Acknowledgments" anchor="acks">
2119<t>
2120  See Section 10 of <xref target="RFC7230"/>.
2121</t>
2122</section>
2123
2124</middle>
2125
2126<back>
2127<references title="Normative References">
2128
2129<!-- draft-ietf-httpbis-p1-messaging-26 -->
2130  <reference anchor="RFC7230">
2131    <front>
2132      <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
2133      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2134        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2135        <address><email>fielding@gbiv.com</email></address>
2136      </author>
2137      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2138        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2139        <address><email>julian.reschke@greenbytes.de</email></address>
2140      </author>
2141      <date month="May" year="2014"/>
2142    </front>
2143    <seriesInfo name="RFC" value="7230"/>
2144   
2145  </reference>
2146
2147<!-- draft-ietf-httpbis-p2-semantics-26 -->
2148  <reference anchor="RFC7231">
2149    <front>
2150      <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
2151      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2152        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2153        <address><email>fielding@gbiv.com</email></address>
2154      </author>
2155      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2156        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2157        <address><email>julian.reschke@greenbytes.de</email></address>
2158      </author>
2159      <date month="May" year="2014"/>
2160    </front>
2161    <seriesInfo name="RFC" value="7231"/>
2162   
2163  </reference>
2164
2165<!-- draft-ietf-httpbis-p4-conditional-26 -->
2166  <reference anchor="RFC7232">
2167    <front>
2168      <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
2169      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2170        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2171        <address><email>fielding@gbiv.com</email></address>
2172      </author>
2173      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2174        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2175        <address><email>julian.reschke@greenbytes.de</email></address>
2176      </author>
2177      <date month="May" year="2014"/>
2178    </front>
2179    <seriesInfo name="RFC" value="7232"/>
2180   
2181  </reference>
2182
2183<!-- draft-ietf-httpbis-p5-range-26 -->
2184  <reference anchor="RFC7233">
2185    <front>
2186      <title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
2187      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2188        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2189        <address><email>fielding@gbiv.com</email></address>
2190      </author>
2191      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2192        <organization abbrev="W3C">World Wide Web Consortium</organization>
2193        <address><email>ylafon@w3.org</email></address>
2194      </author>
2195      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2196        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2197        <address><email>julian.reschke@greenbytes.de</email></address>
2198      </author>
2199      <date month="May" year="2014"/>
2200    </front>
2201    <seriesInfo name="RFC" value="7233"/>
2202   
2203  </reference>
2204
2205<!-- draft-ietf-httpbis-p7-auth-26 -->
2206  <reference anchor="RFC7235">
2207    <front>
2208      <title>Hypertext Transfer Protocol (HTTP/1.1): Authentication</title>
2209      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2210        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2211        <address><email>fielding@gbiv.com</email></address>
2212      </author>
2213      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2214        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2215        <address><email>julian.reschke@greenbytes.de</email></address>
2216      </author>
2217      <date month="May" year="2014"/>
2218    </front>
2219    <seriesInfo name="RFC" value="7235"/>
2220   
2221  </reference>
2222
2223  <reference anchor="RFC2119">
2224    <front>
2225      <title>Key words for use in RFCs to Indicate Requirement Levels</title>
2226      <author fullname="Scott Bradner" initials="S." surname="Bradner">
2227        <organization>Harvard University</organization>
2228        <address><email>sob@harvard.edu</email></address>
2229      </author>
2230      <date month="March" year="1997"/>
2231    </front>
2232    <seriesInfo name="BCP" value="14"/>
2233    <seriesInfo name="RFC" value="2119"/>
2234  </reference>
2235
2236  <reference anchor="RFC5234">
2237    <front>
2238      <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
2239      <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
2240        <organization>Brandenburg InternetWorking</organization>
2241        <address>
2242          <email>dcrocker@bbiw.net</email>
2243        </address> 
2244      </author>
2245      <author initials="P." surname="Overell" fullname="Paul Overell">
2246        <organization>THUS plc.</organization>
2247        <address>
2248          <email>paul.overell@thus.net</email>
2249        </address>
2250      </author>
2251      <date month="January" year="2008"/>
2252    </front>
2253    <seriesInfo name="STD" value="68"/>
2254    <seriesInfo name="RFC" value="5234"/>
2255  </reference>
2256 
2257</references>
2258
2259<references title="Informative References">
2260
2261
2262
2263  <reference anchor="RFC2616">
2264    <front>
2265      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2266      <author fullname="R. Fielding" initials="R." surname="Fielding">
2267        <organization>University of California, Irvine</organization>
2268        <address><email>fielding@ics.uci.edu</email></address>
2269      </author>
2270      <author fullname="J. Gettys" initials="J." surname="Gettys">
2271        <organization>W3C</organization>
2272        <address><email>jg@w3.org</email></address>
2273      </author>
2274      <author fullname="J. Mogul" initials="J." surname="Mogul">
2275        <organization>Compaq Computer Corporation</organization>
2276        <address><email>mogul@wrl.dec.com</email></address>
2277      </author>
2278      <author fullname="H. Frystyk" initials="H." surname="Frystyk">
2279        <organization>MIT Laboratory for Computer Science</organization>
2280        <address><email>frystyk@w3.org</email></address>
2281      </author>
2282      <author fullname="L. Masinter" initials="L." surname="Masinter">
2283        <organization>Xerox Corporation</organization>
2284        <address><email>masinter@parc.xerox.com</email></address>
2285      </author>
2286      <author fullname="P. Leach" initials="P." surname="Leach">
2287        <organization>Microsoft Corporation</organization>
2288        <address><email>paulle@microsoft.com</email></address>
2289      </author>
2290      <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee">
2291        <organization>W3C</organization>
2292        <address><email>timbl@w3.org</email></address>
2293      </author>
2294      <date month="June" year="1999"/>
2295    </front>
2296    <seriesInfo name="RFC" value="2616"/>
2297  </reference>
2298
2299  <reference anchor="BCP90">
2300    <front>
2301      <title>Registration Procedures for Message Header Fields</title>
2302      <author fullname="G. Klyne" initials="G." surname="Klyne">
2303        <organization>Nine by Nine</organization>
2304        <address><email>GK-IETF@ninebynine.org</email></address>
2305      </author>
2306      <author fullname="M. Nottingham" initials="M." surname="Nottingham">
2307        <organization>BEA Systems</organization>
2308        <address><email>mnot@pobox.com</email></address>
2309      </author>
2310      <author fullname="J. Mogul" initials="J." surname="Mogul">
2311        <organization>HP Labs</organization>
2312        <address><email>JeffMogul@acm.org</email></address>
2313      </author>
2314      <date month="September" year="2004"/>
2315    </front>
2316    <seriesInfo name="BCP" value="90"/>
2317    <seriesInfo name="RFC" value="3864"/>
2318  </reference>
2319
2320  <reference anchor="RFC5226">
2321    <front>
2322      <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
2323      <author initials="T." surname="Narten" fullname="T. Narten">
2324        <organization>IBM</organization>
2325        <address><email>narten@us.ibm.com</email></address>
2326      </author>
2327      <author initials="H." surname="Alvestrand" fullname="H. Alvestrand">
2328        <organization>Google</organization>
2329        <address><email>Harald@Alvestrand.no</email></address>
2330      </author>
2331      <date year="2008" month="May"/>
2332    </front>
2333    <seriesInfo name="BCP" value="26"/>
2334    <seriesInfo name="RFC" value="5226"/>
2335  </reference>
2336
2337  <reference anchor="RFC5861">
2338    <front>
2339      <title abbrev="HTTP stale controls">HTTP Cache-Control Extensions for Stale Content</title>
2340      <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
2341        <organization>Yahoo! Inc.</organization>
2342        <address><email>mnot@yahoo-inc.com</email></address>
2343      </author>
2344      <date month="April" year="2010"/>
2345    </front>
2346    <seriesInfo name="RFC" value="5861"/>
2347  </reference>
2348
2349  <reference anchor="RFC5905">
2350    <front>
2351      <title>Network Time Protocol Version 4: Protocol and Algorithms Specification</title>
2352      <author initials="D." surname="Mills" fullname="David L. Mills"/>
2353      <author initials="J." surname="Martin" fullname="Jim Martin" role="editor"/>
2354      <author initials="J." surname="Burbank" fullname="Jack Burbank"/>
2355      <author initials="W." surname="Kasch" fullname="William Kasch"/>
2356      <date year="2010" month="June"/>
2357    </front>
2358    <seriesInfo name="RFC" value="5905"/>
2359  </reference>
2360
2361  <reference anchor="RFC6265">
2362    <front>
2363      <title>HTTP State Management Mechanism</title>
2364      <author initials="A." surname="Barth" fullname="Adam Barth">
2365        <organization abbrev="U.C. Berkeley">
2366          University of California, Berkeley
2367        </organization>
2368        <address><email>abarth@eecs.berkeley.edu</email></address>
2369      </author>
2370      <date year="2011" month="April"/>
2371    </front>
2372    <seriesInfo name="RFC" value="6265"/>
2373  </reference>
2374
2375</references>
2376
2377<section anchor="changes.from.rfc.2616" title="Changes from RFC 2616">
2378<t>
2379  The specification has been substantially rewritten for clarity.
2380</t>
2381<t>
2382  The conditions under which an authenticated response can be cached have been
2383  clarified.
2384  (<xref target="caching.authenticated.responses"/>)
2385</t>
2386<t>
2387  New status codes can now define that caches are allowed to use heuristic
2388  freshness with them.
2389  Caches are now allowed to calculate heuristic freshness for URIs with query
2390  components.
2391  (<xref target="heuristic.freshness"/>)
2392</t>
2393<t>
2394  The algorithm for calculating age is now less conservative.
2395  Caches are now required to handle dates with time zones as if they're
2396  invalid, because it's not possible to accurately guess.
2397  (<xref target="age.calculations"/>)
2398</t>
2399<t>
2400  The Content-Location response header field is no longer used
2401  to determine the appropriate response to use when validating.
2402  (<xref target="validation.model"/>)
2403</t>
2404<t>
2405  The algorithm for selecting a cached negotiated response to use has been
2406  clarified in several ways. In particular, it now explicitly allows
2407  header-specific canonicalization when processing selecting header fields.
2408  (<xref target="caching.negotiated.responses"/>).
2409</t>
2410<t>
2411  Requirements regarding denial-of-service attack avoidance when performing
2412  invalidation have been clarified.
2413  (<xref target="invalidation"/>)
2414</t>
2415<t>
2416  Cache invalidation only occurs when a successful response is received.
2417  (<xref target="invalidation"/>)
2418</t>
2419<t>
2420  Cache directives are explicitly defined to be case-insensitive.
2421  Handling of multiple instances of cache directives when only one is
2422  expected is now defined.
2423  (<xref target="header.cache-control"/>)
2424</t>
2425<t>
2426  The "no-store" request directive doesn't apply to responses; i.e.,
2427  a cache can satisfy a request with no-store on it and does not invalidate
2428  it. (<xref target="cache-request-directive.no-store"/>)
2429</t>
2430<t>
2431  The qualified forms of the private and no-cache cache directives are noted
2432  to not be widely implemented; for example, "private=foo" is interpreted by many
2433  caches as simply "private". Additionally, the meaning of the qualified
2434  form of no-cache has been clarified.
2435  (<xref target="cache-response-directive"/>)
2436</t>
2437<t>
2438  The "no-cache" response directive's meaning has been clarified.
2439  (<xref target="cache-response-directive.no-cache"/>)
2440</t>
2441<t>
2442  The one-year limit on <xref target="header.expires" format="none">Expires</xref> header field values has been removed; instead,
2443  the reasoning for using a sensible value is given.
2444  (<xref target="header.expires"/>)
2445</t>
2446<t>
2447  The <xref target="header.pragma" format="none">Pragma</xref> header field is now only defined for backwards compatibility;
2448  future pragmas are deprecated.
2449  (<xref target="header.pragma"/>)
2450</t>
2451<t>
2452  Some requirements regarding production and processing of the <xref target="header.warning" format="none">Warning</xref>
2453  header fields have been relaxed, as it is not widely implemented.
2454  Furthermore, the <xref target="header.warning" format="none">Warning</xref> header field no longer uses RFC 2047 encoding,
2455
2456<!--[rfced] Should an informative reference entry be added to RFC 2047? -->
2457
2458  nor does it allow multiple languages, as these aspects were not implemented.
2459  (<xref target="header.warning"/>)
2460</t>
2461<t>
2462  This specification introduces the Cache Directive and Warn Code Registries,
2463  and defines considerations for new cache directives
2464  (Sections <xref target="cache.directive.registry" format="counter"/> and <xref target="warn.code.registry" format="counter"/>).
2465</t>
2466</section>
2467
2468<section title="Imported ABNF" anchor="imported.abnf">
2469   
2470   
2471   
2472   
2473   
2474   
2475   
2476   
2477   
2478   
2479   
2480   
2481   
2482   
2483   
2484   
2485<t>
2486   The following core rules are included by reference, as defined in Appendix B.1 of <xref target="RFC5234"/>: ALPHA (letters), CR (carriage
2487   return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double
2488   quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit
2489   sequence of data), SP (space), and VCHAR (any visible US-ASCII character).
2490</t>
2491<t>
2492   The rules below are defined in <xref target="RFC7230"/>:
2493</t>
2494<figure><artwork type="abnf2616"><![CDATA[
2495  OWS           = <OWS, see [RFC7230], Section 3.2.3>
2496  field-name    = <field-name, see [RFC7230], Section 3.2>
2497  quoted-string = <quoted-string, see [RFC7230], Section 3.2.6>
2498  token         = <token, see [RFC7230], Section 3.2.6>
2499
2500  port          = <port, see [RFC7230], Section 2.7>
2501  pseudonym     = <pseudonym, see [RFC7230], Section 5.7.1>
2502  uri-host      = <uri-host, see [RFC7230], Section 2.7>
2503]]></artwork></figure>
2504<t>
2505   The rules below are defined in other parts:
2506</t>
2507<figure><artwork type="abnf2616"><![CDATA[
2508  HTTP-date     = <HTTP-date, see [RFC7231], Section 7.1.1.1>
2509]]></artwork></figure>
2510</section>
2511
2512
2513<section title="Collected ABNF" anchor="collected.abnf">
2514<t>
2515  In the collected ABNF below, list rules are expanded as per Section 1.2 of <xref target="RFC7230"/>.
2516</t><figure>
2517<artwork type="abnf" name="p6-cache.parsed-abnf"><![CDATA[
2518Age = delta-seconds
2519
2520Cache-Control = *( "," OWS ) cache-directive *( OWS "," [ OWS
2521 cache-directive ] )
2522
2523Expires = HTTP-date
2524
2525HTTP-date = <HTTP-date, see [RFC7231], Section 7.1.1.1>
2526
2527OWS = <OWS, see [RFC7230], Section 3.2.3>
2528
2529Pragma = *( "," OWS ) pragma-directive *( OWS "," [ OWS
2530 pragma-directive ] )
2531
2532Warning = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ]
2533 )
2534
2535cache-directive = token [ "=" ( token / quoted-string ) ]
2536
2537delta-seconds = 1*DIGIT
2538
2539extension-pragma = token [ "=" ( token / quoted-string ) ]
2540
2541field-name = <field-name, see [RFC7230], Section 3.2>
2542
2543port = <port, see [RFC7230], Section 2.7>
2544pragma-directive = "no-cache" / extension-pragma
2545pseudonym = <pseudonym, see [RFC7230], Section 5.7.1>
2546
2547quoted-string = <quoted-string, see [RFC7230], Section 3.2.6>
2548
2549token = <token, see [RFC7230], Section 3.2.6>
2550
2551uri-host = <uri-host, see [RFC7230], Section 2.7>
2552
2553warn-agent = ( uri-host [ ":" port ] ) / pseudonym
2554warn-code = 3DIGIT
2555warn-date = DQUOTE HTTP-date DQUOTE
2556warn-text = quoted-string
2557warning-value = warn-code SP warn-agent SP warn-text [ SP warn-date
2558 ]
2559]]></artwork>
2560</figure>
2561</section>
2562
2563
2564  </back>
2565</rfc>
Note: See TracBrowser for help on using the repository browser.