source: draft-ietf-httpbis/21/draft-ietf-httpbis-p4-conditional-21.xml @ 2211

Last change on this file since 2211 was 1929, checked in by julian.reschke@…, 8 years ago

prepare release of -21 drafts on Oct 4

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 59.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3    This XML document is the output of clean-for-DTD.xslt; a tool that strips
4    extensions to RFC2629(bis) from documents for processing with xml2rfc.
5-->
6<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
7<?rfc toc="yes" ?>
8<?rfc symrefs="yes" ?>
9<?rfc sortrefs="yes" ?>
10<?rfc compact="yes"?>
11<?rfc subcompact="no" ?>
12<?rfc linkmailto="no" ?>
13<?rfc editing="no" ?>
14<?rfc comments="yes"?>
15<?rfc inline="yes"?>
16<?rfc rfcedstyle="yes"?>
17<!DOCTYPE rfc
18  PUBLIC "" "rfc2629.dtd">
19<rfc obsoletes="2616" category="std" ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p4-conditional-21">
20
21
22
23<front>
24
25  <title abbrev="HTTP/1.1 Conditional Requests">Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
26
27  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
28    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
29    <address>
30      <postal>
31        <street>345 Park Ave</street>
32        <city>San Jose</city>
33        <region>CA</region>
34        <code>95110</code>
35        <country>USA</country>
36      </postal>
37      <email>fielding@gbiv.com</email>
38      <uri>http://roy.gbiv.com/</uri>
39    </address>
40  </author>
41
42  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
43    <organization abbrev="greenbytes">greenbytes GmbH</organization>
44    <address>
45      <postal>
46        <street>Hafenweg 16</street>
47        <city>Muenster</city><region>NW</region><code>48155</code>
48        <country>Germany</country>
49      </postal>
50      <email>julian.reschke@greenbytes.de</email>
51      <uri>http://greenbytes.de/tech/webdav/</uri>
52    </address>
53  </author>
54
55  <date month="October" year="2012" day="4"/>
56  <workgroup>HTTPbis Working Group</workgroup>
57
58<abstract>
59<t>
60   The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
61   distributed, collaborative, hypertext information systems. This document
62   defines HTTP/1.1 conditional requests, including metadata header fields
63   for indicating state changes, request header fields for making
64   preconditions on such state, and rules for constructing the responses to a
65   conditional request when one or more preconditions evaluate to false.
66</t>
67</abstract>
68
69<note title="Editorial Note (To be removed by RFC Editor)">
70  <t>
71    Discussion of this draft takes place on the HTTPBIS working group
72    mailing list (ietf-http-wg@w3.org), which is archived at
73    <eref target="http://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
74  </t>
75  <t>
76    The current issues list is at
77    <eref target="http://tools.ietf.org/wg/httpbis/trac/report/3"/> and related
78    documents (including fancy diffs) can be found at
79    <eref target="http://tools.ietf.org/wg/httpbis/"/>.
80  </t>
81  <t>
82    The changes in this draft are summarized in <xref target="changes.since.20"/>.
83  </t>
84</note>
85</front>
86
87<middle>
88<section title="Introduction" anchor="introduction">
89<t>
90   Conditional requests are HTTP requests <xref target="Part2"/> that include
91   one or more header fields indicating a precondition to be tested before
92   applying the method semantics to the target resource.
93   Each precondition is based on metadata that is expected to change if the
94   selected representation of the target resource is changed.
95   This document defines the HTTP/1.1 conditional request mechanisms in terms
96   of the architecture, syntax notation, and conformance criteria defined in
97   <xref target="Part1"/>.
98</t>
99<t>
100   Conditional GET requests are the most efficient mechanism for HTTP
101   cache updates <xref target="Part6"/>.  Conditionals can also be
102   applied to state-changing methods, such as PUT and DELETE, to prevent
103   the "lost update" problem: one client accidentally overwriting
104   the work of another client that has been acting in parallel.
105</t>
106<t>
107   Conditional request preconditions are based on the state of the target
108   resource as a whole (its current value set) or the state as observed
109   in a previously obtained representation (one value in that set).
110   A resource might have multiple current representations, each with its
111   own observable state.  The conditional request mechanisms assume that
112   the mapping of requests to corresponding representations will be
113   consistent over time if the server intends to take advantage of
114   conditionals.  Regardless, if the mapping is inconsistent and
115   the server is unable to select the appropriate representation, then
116   no harm will result when the precondition evaluates to false.
117</t>
118<t><iref primary="true" item="selected representation"/>
119   We use the term "selected representation" to refer to
120   the current representation of the target resource that would have been
121   selected in a successful response if the same request had used the method
122   GET and had excluded all of the conditional request header fields.
123   The conditional request preconditions are evaluated by comparing the
124   values provided in the request header fields to the current metadata
125   for the selected representation.
126</t>
127
128<section title="Conformance and Error Handling" anchor="conformance">
129<t>
130   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
131   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
132   document are to be interpreted as described in <xref target="RFC2119"/>.
133</t>
134<t>
135   Conformance criteria and considerations regarding error handling
136   are defined in Section 2.5 of <xref target="Part1"/>.
137</t>
138</section>
139
140<section title="Syntax Notation" anchor="notation">
141<t>
142   This specification uses the Augmented Backus-Naur Form (ABNF) notation
143   of <xref target="RFC5234"/> with the list rule extension defined in
144   Section 1.2 of <xref target="Part1"/>. <xref target="imported.abnf"/> describes rules imported from
145   other documents. <xref target="collected.abnf"/> shows the collected ABNF
146   with the list rule expanded.
147</t>
148</section>
149</section>
150
151<section title="Validators" anchor="validators">
152   <iref primary="true" item="metadata"/>
153   <iref primary="true" item="validator"/>
154<t>
155   This specification defines two forms of metadata that are commonly used
156   to observe resource state and test for preconditions: modification dates
157   (<xref target="header.last-modified"/>) and opaque entity tags
158   (<xref target="header.etag"/>).  Additional metadata that reflects resource state
159   has been defined by various extensions of HTTP, such as WebDAV
160   <xref target="RFC4918"/>, that are beyond the scope of this specification.
161   A resource metadata value is referred to as a "validator"
162   when it is used within a precondition.
163</t>
164
165<section title="Weak versus Strong" anchor="weak.and.strong.validators">
166   <iref primary="true" item="validator" subitem="weak"/>
167   <iref primary="true" item="validator" subitem="strong"/>
168<t>
169   Validators come in two flavors: strong or weak.  Weak validators are easy
170   to generate but are far less useful for comparisons.  Strong validators
171   are ideal for comparisons but can be very difficult (and occasionally
172   impossible) to generate efficiently.  Rather than impose that all forms
173   of resource adhere to the same strength of validator, HTTP exposes the
174   type of validator in use and imposes restrictions on when weak validators
175   can be used as preconditions.
176</t>
177<t>
178   A "strong validator" is a representation metadata value that MUST be
179   changed to a new, previously unused or guaranteed unique, value whenever
180   a change occurs to the representation data such that a change would be
181   observable in the payload body of a 200 (OK) response to GET.
182</t>
183<t>  
184   A strong validator MAY be changed for other reasons, such as when a semantically
185   significant part of the representation metadata is changed (e.g.,
186   Content-Type), but it is in the best interests of the origin
187   server to only change the value when it is necessary to invalidate the
188   stored responses held by remote caches and authoring tools.  A strong
189   validator MUST be unique across all representations of a given resource,
190   such that no two representations of that resource share the same validator
191   unless their payload body would be identical.
192</t>
193<t>
194   Cache entries might persist for arbitrarily long periods, regardless
195   of expiration times.  Thus, a cache might attempt to validate an
196   entry using a validator that it obtained in the distant past.
197   A strong validator MUST be unique across all versions of all
198   representations associated with a particular resource over time.
199   However, there is no implication of uniqueness across representations
200   of different resources (i.e., the same strong validator might be
201   in use for representations of multiple resources at the same time
202   and does not imply that those representations are equivalent).
203</t>
204<t>
205   There are a variety of strong validators used in practice.  The best are
206   based on strict revision control, wherein each change to a representation
207   always results in a unique node name and revision identifier being assigned
208   before the representation is made accessible to GET.  A collision-resistant hash
209   function applied to the representation data is also sufficient if the data
210   is available prior to the response header fields being sent and the digest
211   does not need to be recalculated every time a validation request is
212   received.  However, if a resource has distinct representations that differ
213   only in their metadata, such as might occur with content negotiation over
214   media types that happen to share the same data format, then the origin
215   server SHOULD incorporate additional information in the validator to
216   distinguish those representations and avoid confusing cache behavior.
217</t>
218<t>
219   In contrast, a "weak validator" is a representation metadata value that
220   might not be changed for every change to the representation data.  This
221   weakness might be due to limitations in how the value is calculated, such
222   as clock resolution or an inability to ensure uniqueness for all possible
223   representations of the resource, or due to a desire by the resource owner
224   to group representations by some self-determined set of equivalency
225   rather than unique sequences of data.  An origin server SHOULD change a
226   weak entity-tag whenever it considers prior representations to be
227   unacceptable as a substitute for the current representation. In other words,
228   a weak entity-tag ought to change whenever the origin server wants caches to
229   invalidate old responses.
230</t>
231<t>
232   For example, the representation of a weather report that changes in
233   content every second, based on dynamic measurements, might be grouped
234   into sets of equivalent representations (from the origin server's
235   perspective) with the same weak validator in order to allow cached
236   representations to be valid for a reasonable period of time (perhaps
237   adjusted dynamically based on server load or weather quality).
238   Likewise, a representation's modification time, if defined with only
239   one-second resolution, might be a weak validator if it is possible
240   for the representation to be modified twice during a single second and
241   retrieved between those modifications.
242</t>
243<t>
244   A "use" of a validator occurs when either a client generates a request
245   and includes the validator in a precondition or when a server
246   compares two validators.
247   Weak validators are only usable in contexts that do not depend on exact
248   equality of a representation's payload body.
249   Strong validators are usable and preferred for all conditional requests,
250   including cache validation, partial content ranges, and "lost update"
251   avoidance.
252</t>
253</section>
254
255<section title="Last-Modified" anchor="header.last-modified">
256  <iref primary="true" item="Last-Modified header field"/>
257 
258<t>
259   The "Last-Modified" header field indicates the date and time at
260   which the origin server believes the selected representation was
261   last modified.
262</t>
263<figure><iref primary="true" item="Grammar" subitem="Last-Modified"/><artwork type="abnf2616"><![CDATA[
264  Last-Modified = HTTP-date
265]]></artwork></figure>
266<t>
267   An example of its use is
268</t>
269<figure><artwork type="example"><![CDATA[
270  Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
271]]></artwork></figure>
272
273<section title="Generation" anchor="lastmod.generation">
274<t>
275   Origin servers SHOULD send Last-Modified for any selected
276   representation for which a last modification date can be reasonably
277   and consistently determined, since its use in conditional requests
278   and evaluating cache freshness (<xref target="Part6"/>) results in a substantial
279   reduction of HTTP traffic on the Internet and can be a significant
280   factor in improving service scalability and reliability.
281</t>
282<t>
283   A representation is typically the sum of many parts behind the
284   resource interface.  The last-modified time would usually be
285   the most recent time that any of those parts were changed.
286   How that value is determined for any given resource is an
287   implementation detail beyond the scope of this specification.
288   What matters to HTTP is how recipients of the Last-Modified
289   header field can use its value to make conditional requests
290   and test the validity of locally cached responses.
291</t>
292<t>
293   An origin server SHOULD obtain the Last-Modified value of the
294   representation as close as possible to the time that it generates the
295   Date field value for its response. This allows a recipient to
296   make an accurate assessment of the representation's modification time,
297   especially if the representation changes near the time that the
298   response is generated.
299</t>
300<t>
301   An origin server with a clock MUST NOT send a Last-Modified date
302   that is later than the server's time of message origination (Date).
303   If the last modification time is derived from implementation-specific
304   metadata that evaluates to some time in the future, according to the
305   origin server's clock, then the origin server MUST replace that
306   value with the message origination date. This prevents a future
307   modification date from having an adverse impact on cache validation.
308</t>
309<t>
310   An origin server without a clock MUST NOT assign Last-Modified
311   values to a response unless these values were associated
312   with the resource by some other system or user with a reliable clock.
313</t>
314</section>
315
316<section title="Comparison" anchor="lastmod.comparison">
317<t>
318   A Last-Modified time, when used as a validator in a request, is
319   implicitly weak unless it is possible to deduce that it is strong,
320   using the following rules:
321  <list style="symbols">
322     <t>The validator is being compared by an origin server to the
323        actual current validator for the representation and,</t>
324     <t>That origin server reliably knows that the associated representation did
325        not change twice during the second covered by the presented
326        validator.</t>
327  </list>
328</t>
329<t>
330   or
331  <list style="symbols">
332     <t>The validator is about to be used by a client in an <xref target="header.if-modified-since" format="none">If-Modified-Since</xref>,
333        <xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref> header field, because the client has
334        a cache entry, or If-Range for the associated
335        representation, and</t>
336     <t>That cache entry includes a Date value, which gives the
337        time when the origin server sent the original response, and</t>
338     <t>The presented Last-Modified time is at least 60 seconds before
339        the Date value.</t>
340  </list>
341</t>
342<t>
343   or
344  <list style="symbols">
345     <t>The validator is being compared by an intermediate cache to the
346        validator stored in its cache entry for the representation, and</t>
347     <t>That cache entry includes a Date value, which gives the
348        time when the origin server sent the original response, and</t>
349     <t>The presented Last-Modified time is at least 60 seconds before
350        the Date value.</t>
351  </list>
352</t>
353<t>
354   This method relies on the fact that if two different responses were
355   sent by the origin server during the same second, but both had the
356   same Last-Modified time, then at least one of those responses would
357   have a Date value equal to its Last-Modified time. The
358   arbitrary 60-second limit guards against the possibility that the Date and
359   Last-Modified values are generated from different clocks, or at somewhat
360   different times during the preparation of the response. An
361   implementation MAY use a value larger than 60 seconds, if it is
362   believed that 60 seconds is too short.
363</t>
364</section>
365</section>
366
367<section title="ETag" anchor="header.etag">
368  <iref primary="true" item="ETag header field"/>
369 
370 
371 
372 
373 
374<t>
375   The "ETag" header field provides the current entity-tag for the
376   selected representation.
377   An entity-tag is an opaque validator for differentiating between
378   multiple representations of the same resource, regardless of whether
379   those multiple representations are due to resource state changes over
380   time, content negotiation resulting in multiple representations being
381   valid at the same time, or both. An entity-tag consists of an opaque
382   quoted string, possibly prefixed by a weakness indicator.
383</t>
384<figure><iref primary="true" item="Grammar" subitem="ETag"/><iref primary="true" item="Grammar" subitem="entity-tag"/><iref primary="true" item="Grammar" subitem="weak"/><iref primary="true" item="Grammar" subitem="opaque-tag"/><iref primary="true" item="Grammar" subitem="etagc"/><artwork type="abnf2616"><![CDATA[
385  ETag       = entity-tag
386
387  entity-tag = [ weak ] opaque-tag
388  weak       = %x57.2F ; "W/", case-sensitive
389  opaque-tag = DQUOTE *etagc DQUOTE
390  etagc      = %x21 / %x23-7E / obs-text
391             ; VCHAR except double quotes, plus obs-text
392]]></artwork></figure>
393<t><list>
394  <t>
395    Note: Previously, opaque-tag was defined to be a quoted-string
396    (<xref target="RFC2616"/>, Section 3.11), thus some recipients
397    might perform backslash unescaping. Servers therefore ought to avoid
398    backslash characters in entity tags.
399  </t>
400</list></t>
401<t>
402   An entity-tag can be more reliable for validation than a modification
403   date in situations where it is inconvenient to store modification
404   dates, where the one-second resolution of HTTP date values is not
405   sufficient, or where modification dates are not consistently maintained.
406</t>
407<figure><preamble>
408  Examples:
409</preamble>
410<artwork type="example"><![CDATA[
411  ETag: "xyzzy"
412  ETag: W/"xyzzy"
413  ETag: ""
414]]></artwork></figure>
415<t>
416   An entity-tag can be either a weak or strong validator, with
417   strong being the default.  If an origin server provides an entity-tag
418   for a representation and the generation of that entity-tag does not satisfy
419   the requirements for a strong validator
420   (<xref target="weak.and.strong.validators"/>), then that
421   entity-tag MUST be marked as weak by prefixing its opaque value
422   with "W/" (case-sensitive).
423</t>
424
425<section title="Generation" anchor="entity.tag.generation">
426<t>
427   The principle behind entity-tags is that only the service author
428   knows the implementation of a resource well enough to select the
429   most accurate and efficient validation mechanism for that resource,
430   and that any such mechanism can be mapped to a simple sequence of
431   octets for easy comparison.  Since the value is opaque, there is no
432   need for the client to be aware of how each entity-tag is constructed.
433</t>
434<t>
435   For example, a resource that has implementation-specific versioning
436   applied to all changes might use an internal revision number, perhaps
437   combined with a variance identifier for content negotiation, to
438   accurately differentiate between representations.
439   Other implementations might use a collision-resistant hash of
440   representation content,
441   a combination of various filesystem attributes, or a modification
442   timestamp that has sub-second resolution.
443</t>
444<t>
445   Origin servers SHOULD send ETag for any selected representation
446   for which detection of changes can be reasonably and consistently
447   determined, since the entity-tag's use in conditional requests and
448   evaluating cache freshness (<xref target="Part6"/>) can result in a substantial
449   reduction of HTTP network traffic and can be a significant factor in
450   improving service scalability and reliability.
451</t>
452</section>
453
454<section title="Comparison" anchor="entity.tag.comparison">
455 
456<t>
457   There are two entity-tag comparison functions, depending
458   on whether the comparison context allows the use of weak validators
459   or not:
460  <list style="symbols">
461     <t>The strong comparison function: in order to be considered equal,
462        both opaque-tags MUST be identical character-by-character, and both
463        MUST NOT be weak.</t>
464     <t>The weak comparison function: in order to be considered equal, both
465        opaque-tags MUST be identical character-by-character, but
466        either or both of them MAY be tagged as "weak" without affecting
467        the result.</t>
468  </list>
469</t>
470<t>
471   The example below shows the results for a set of entity-tag pairs,
472   and both the weak and strong comparison function results:
473</t>
474<texttable align="left">
475  <ttcol>ETag 1</ttcol>
476  <ttcol>ETag 2</ttcol>
477  <ttcol>Strong Comparison</ttcol>
478  <ttcol>Weak Comparison</ttcol>
479
480  <c>W/"1"</c>
481  <c>W/"1"</c>
482  <c>no match</c>
483  <c>match</c>
484 
485  <c>W/"1"</c>
486  <c>W/"2"</c>
487  <c>no match</c>
488  <c>no match</c>
489
490  <c>W/"1"</c>
491  <c>"1"</c>
492  <c>no match</c>
493  <c>match</c>
494
495  <c>"1"</c>
496  <c>"1"</c>
497  <c>match</c>
498  <c>match</c>
499</texttable>
500</section>
501
502<section title="Example: Entity-tags varying on Content-Negotiated Resources" anchor="example.entity.tag.vs.conneg">
503<t>
504   Consider a resource that is subject to content negotiation (Section 3.4 of <xref target="Part2"/>),
505   and where the representations returned upon a GET request vary based on
506   the Accept-Encoding request header field
507   (Section 6.3.4 of <xref target="Part2"/>):
508</t>
509<figure><preamble>&gt;&gt; Request:</preamble><artwork type="message/http; msgtype=&#34;request&#34;"><![CDATA[
510  GET /index HTTP/1.1
511  Host: www.example.com
512  Accept-Encoding: gzip
513 
514  ]]></artwork></figure>
515<t>
516   In this case, the response might or might not use the gzip content coding.
517   If it does not, the response might look like:
518</t>
519<figure><preamble>&gt;&gt; Response:</preamble><artwork type="message/http; msgtype=&#34;response&#34;"><![CDATA[
520  HTTP/1.1 200 OK
521  Date: Thu, 26 Mar 2010 00:05:00 GMT
522  ETag: "123-a"
523  Content-Length: 70
524  Vary: Accept-Encoding
525  Content-Type: text/plain
526 
527  Hello World!
528  Hello World!
529  Hello World!
530  Hello World!
531  Hello World!
532  ]]></artwork></figure>
533<t>
534   An alternative representation that does use gzip content coding would be:
535</t>
536<figure><preamble>&gt;&gt; Response:</preamble><artwork type="message/http; msgtype=&#34;response&#34;"><![CDATA[
537  HTTP/1.1 200 OK
538  Date: Thu, 26 Mar 2010 00:05:00 GMT
539  ETag: "123-b"
540  Content-Length: 43
541  Vary: Accept-Encoding
542  Content-Type: text/plain
543  Content-Encoding: gzip
544 
545  ...binary data...]]></artwork></figure>
546<t><list>
547  <t>
548    Note: Content codings are a property of the representation,
549    so therefore an entity-tag of an encoded representation has to be distinct
550    from an unencoded representation to prevent conflicts during cache updates
551    and range requests.  In contrast, transfer codings (Section 4 of <xref target="Part1"/>)
552    apply only during message transfer and do not require distinct entity-tags.
553  </t>
554</list></t>
555</section>
556</section>
557
558<section title="Rules for When to Use Entity-tags and Last-Modified Dates" anchor="rules.for.when.to.use.entity.tags.and.last-modified.dates">
559<t>
560   We adopt a set of rules and recommendations for origin servers,
561   clients, and caches regarding when various validator types ought to
562   be used, and for what purposes.
563</t>
564<t>
565   HTTP/1.1 origin servers:
566  <list style="symbols">
567     <t>SHOULD send an entity-tag validator unless it is not feasible to
568        generate one.</t>
569
570     <t>MAY send a weak entity-tag instead of a strong entity-tag, if
571        performance considerations support the use of weak entity-tags,
572        or if it is unfeasible to send a strong entity-tag.</t>
573
574     <t>SHOULD send a <xref target="header.last-modified" format="none">Last-Modified</xref> value if it is feasible to
575        send one.</t>
576  </list>
577</t>
578<t>
579   In other words, the preferred behavior for an HTTP/1.1 origin server
580   is to send both a strong entity-tag and a <xref target="header.last-modified" format="none">Last-Modified</xref> value.
581</t>
582<t>
583   HTTP/1.1 clients:
584  <list style="symbols">
585     <t>MUST use that entity-tag in any cache-conditional request (using
586        <xref target="header.if-match" format="none">If-Match</xref> or <xref target="header.if-none-match" format="none">If-None-Match</xref>) if an
587        entity-tag has been provided by the origin server.</t>
588
589     <t>SHOULD use the <xref target="header.last-modified" format="none">Last-Modified</xref> value in non-subrange
590        cache-conditional requests (using <xref target="header.if-modified-since" format="none">If-Modified-Since</xref>)
591        if only a Last-Modified value has been provided by the origin server.</t>
592
593     <t>MAY use the <xref target="header.last-modified" format="none">Last-Modified</xref> value in subrange
594        cache-conditional requests (using <xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref>)
595        if only a Last-Modified value has been provided by an HTTP/1.0 origin
596        server. The user agent SHOULD provide a way to disable this, in case
597        of difficulty.</t>
598
599     <t>SHOULD use both validators in cache-conditional requests if both an
600        entity-tag and a <xref target="header.last-modified" format="none">Last-Modified</xref> value have been provided
601        by the origin server. This allows both HTTP/1.0 and HTTP/1.1 caches to
602        respond appropriately.</t>
603  </list>
604</t>
605<t>
606   An HTTP/1.1 origin server, upon receiving a conditional request that
607   includes both a Last-Modified date (e.g., in an <xref target="header.if-modified-since" format="none">If-Modified-Since</xref>
608   or <xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref> header field) and one or more
609   entity-tags (e.g., in an <xref target="header.if-match" format="none">If-Match</xref>, <xref target="header.if-none-match" format="none">If-None-Match</xref>,
610   or If-Range header field) as cache validators, MUST NOT
611   return a response status code of <xref target="status.304" format="none">304 (Not Modified)</xref> unless
612   doing so is consistent with all of the conditional header fields in the
613   request.
614</t>
615<t>
616   An HTTP/1.1 caching proxy, upon receiving a conditional request that
617   includes both a Last-Modified date and one or more entity-tags as
618   cache validators, MUST NOT return a locally cached response to the
619   client unless that cached response is consistent with all of the
620   conditional header fields in the request.
621  <list><t>
622      Note: The general principle behind these rules is that HTTP/1.1
623      servers and clients ought to transmit as much non-redundant
624      information as is available in their responses and requests.
625      HTTP/1.1 systems receiving this information will make the most
626      conservative assumptions about the validators they receive.
627  </t><t>
628      HTTP/1.0 clients and caches might ignore entity-tags. Generally,
629      last-modified values received or used by these systems will
630      support transparent and efficient caching, and so HTTP/1.1 origin
631      servers still ought to provide Last-Modified values.
632  </t></list>
633</t>
634</section>
635</section>
636
637<section title="Precondition Header Fields" anchor="header.field.definitions">
638<t>
639   This section defines the syntax and semantics of HTTP/1.1 header fields
640   for applying preconditions on requests.
641   <xref target="precedence"/> defines the order of evaluation when
642   more than one precondition is present in a request.
643</t>
644
645<section title="If-Match" anchor="header.if-match">
646  <iref primary="true" item="If-Match header field"/>
647 
648<t>
649   The "If-Match" header field can be used to make a request method conditional
650   on the current existence or value of an entity-tag for one or more
651   representations of the target resource.
652</t>
653<t>
654   If-Match is generally useful for resource update requests, such as PUT
655   requests, as a means for protecting against accidental overwrites when
656   multiple clients are acting in parallel on the same resource (i.e., the
657   "lost update" problem).  An If-Match field-value of "*" places the
658   precondition on the existence of any current representation for the
659   target resource.
660</t>
661<figure><iref primary="true" item="Grammar" subitem="If-Match"/><artwork type="abnf2616"><![CDATA[
662  If-Match = "*" / 1#entity-tag
663]]></artwork></figure>
664<t>
665   The If-Match condition is met if and only if any of the entity-tags listed
666   in the If-Match field value match the entity-tag of the selected
667   representation for the target resource (as per <xref target="entity.tag.comparison"/>), or if "*" is given and any current
668   representation exists for the target resource.
669</t>
670<t>
671   If the condition is met, the server MAY perform the request method as if
672   the If-Match header field was not present.
673</t>
674<t>
675   Origin servers MUST NOT perform the requested method if the condition is
676   not met; instead they MUST respond with the <xref target="status.412" format="none">412 (Precondition
677   Failed)</xref> status code.
678</t>
679<t>
680   Proxy servers using a cached response as the selected representation
681   MUST NOT perform the requested method if the condition is not met;
682   instead, they MUST forward the request towards the origin server.
683</t>
684<t>
685   If the request would, without the If-Match header field, result in
686   anything other than a 2xx (Successful) or <xref target="status.412" format="none">412 (Precondition Failed)</xref>
687   status code, then the If-Match header field MUST be ignored.
688</t>
689<t>
690   Examples:
691</t>
692<figure><artwork type="example"><![CDATA[
693  If-Match: "xyzzy"
694  If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
695  If-Match: *
696]]></artwork></figure>
697</section>
698
699<section title="If-None-Match" anchor="header.if-none-match">
700  <iref primary="true" item="If-None-Match header field"/>
701 
702<t>
703   The "If-None-Match" header field can be used to make a request method
704   conditional on not matching any of the current entity-tag values for
705   representations of the target resource.
706</t>
707<t>
708   If-None-Match is primarily used in conditional GET requests to enable
709   efficient updates of cached information with a minimum amount of transaction
710   overhead. A client that has one or more representations previously obtained
711   from the target resource can send If-None-Match with a list of the
712   associated entity-tags in the hope of receiving a <xref target="status.304" format="none">304 (Not
713   Modified)</xref> response if at least one of those representations matches
714   the selected representation.
715</t>
716<t>
717   If-None-Match can also be used with a value of "*" to prevent an unsafe
718   request method (e.g., PUT) from inadvertently modifying an existing
719   representation of the target resource when the client believes that
720   the resource does not have a current representation.  This is a variation
721   on the "lost update" problem that might arise if more than one client
722   attempts to create an initial representation for the target resource.
723</t>
724<figure><iref primary="true" item="Grammar" subitem="If-None-Match"/><artwork type="abnf2616"><![CDATA[
725  If-None-Match = "*" / 1#entity-tag
726]]></artwork></figure>
727<t>
728   The If-None-Match condition is met if and only if none of the entity-tags
729   listed in the If-None-Match field value match the entity-tag of the selected
730   representation for the target resource (as per <xref target="entity.tag.comparison"/>), or if "*" is given and no current
731   representation exists for that resource.
732</t>
733<t>
734   If the condition is not met, the server MUST NOT perform the requested
735   method. Instead, if the request method was GET or HEAD, the server SHOULD
736   respond with a <xref target="status.304" format="none">304 (Not Modified)</xref> status code, including the
737   cache-related header fields (particularly <xref target="header.etag" format="none">ETag</xref>) of the
738   selected representation that has a matching entity-tag. For all other
739   request methods, the server MUST respond with a <xref target="status.412" format="none">412 (Precondition
740   Failed)</xref> status code.
741</t>
742<t>
743   If the condition is met, the server MAY perform the requested method
744   as if the If-None-Match header field did not exist, but MUST also ignore
745   any <xref target="header.if-modified-since" format="none">If-Modified-Since</xref> header field(s) in the request. That
746   is, if no entity-tags match, then the server MUST NOT return a <xref target="status.304" format="none">304
747   (Not Modified)</xref> response.
748</t>
749<t>
750   If the request would, without the If-None-Match header field, result
751   in anything other than a 2xx (Successful) or
752   <xref target="status.304" format="none">304 (Not Modified)</xref> status code, then the If-None-Match
753   header field MUST be ignored. (See <xref target="rules.for.when.to.use.entity.tags.and.last-modified.dates"/> for
754   a discussion of server behavior when both <xref target="header.if-modified-since" format="none">If-Modified-Since</xref>
755   and If-None-Match appear in the same request.)
756</t>
757<t>
758   Examples:
759</t>
760<figure><artwork type="example"><![CDATA[
761  If-None-Match: "xyzzy"
762  If-None-Match: W/"xyzzy"
763  If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
764  If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
765  If-None-Match: *
766]]></artwork></figure>
767</section>
768
769<section title="If-Modified-Since" anchor="header.if-modified-since">
770  <iref primary="true" item="If-Modified-Since header field"/>
771 
772<t>
773   The "If-Modified-Since" header field can be used with GET or HEAD to make
774   the method conditional by modification date: if the selected representation
775   has not been modified since the time specified in this field, then
776   do not perform the request method; instead, respond as detailed below.
777</t>
778<figure><iref primary="true" item="Grammar" subitem="If-Modified-Since"/><artwork type="abnf2616"><![CDATA[
779  If-Modified-Since = HTTP-date
780]]></artwork></figure>
781<t>
782   An example of the field is:
783</t>
784<figure><artwork type="example"><![CDATA[
785  If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
786]]></artwork></figure>
787<t>
788   A GET method with an If-Modified-Since header field and no Range
789   header field requests that the selected representation be transferred only if
790   it has been modified since the date given by the If-Modified-Since
791   header field.
792   The algorithm for determining this includes the following cases:
793  <list style="numbers">
794      <t>If the request would normally result in anything other than a
795         200 (OK) status code, or if the passed If-Modified-Since date is
796         invalid, the response is exactly the same as for a normal GET.
797         A date which is later than the server's current time is
798         invalid.</t>
799
800      <t>If the selected representation has been modified since the
801         If-Modified-Since date, the response is exactly the same as for
802         a normal GET.</t>
803
804      <t>If the selected representation has not been modified since a valid
805         If-Modified-Since date, the server SHOULD return a
806         <xref target="status.304" format="none">304 (Not Modified)</xref> response.</t>
807  </list>
808</t>
809<t>
810   The purpose of this feature is to allow efficient updates of cached
811   information with a minimum amount of transaction overhead.
812  <list><t>
813      Note: The Range header field modifies the meaning of
814      If-Modified-Since; see Section 5.4 of <xref target="Part5"/> for full details.
815    </t><t>
816      Note: If-Modified-Since times are interpreted by the server, whose
817      clock might not be synchronized with the client.
818    </t><t>
819      Note: When handling an If-Modified-Since header field, some
820      servers will use an exact date comparison function, rather than a
821      less-than function, for deciding whether to send a <xref target="status.304" format="none">304 (Not Modified)</xref>
822      response. To get best results when sending an If-Modified-Since
823      header field for cache validation, clients are
824      advised to use the exact date string received in a previous
825      <xref target="header.last-modified" format="none">Last-Modified</xref> header field whenever possible.
826    </t><t>
827      Note: If a client uses an arbitrary date in the If-Modified-Since
828      header field instead of a date taken from the <xref target="header.last-modified" format="none">Last-Modified</xref>
829      header field for the same request, the client needs to be aware that this
830      date is interpreted in the server's understanding of time.
831      Unsynchronized clocks and rounding problems, due to the different
832      encodings of time between the client and server, are concerns.
833      This includes the possibility of race conditions if the
834      document has changed between the time it was first requested and
835      the If-Modified-Since date of a subsequent request, and the
836      possibility of clock-skew-related problems if the If-Modified-Since
837      date is derived from the client's clock without correction
838      to the server's clock. Corrections for different time bases
839      between client and server are at best approximate due to network
840      latency.
841    </t>
842  </list>
843</t>
844</section>
845
846<section title="If-Unmodified-Since" anchor="header.if-unmodified-since">
847  <iref primary="true" item="If-Unmodified-Since header field"/>
848 
849<t>
850   The "If-Unmodified-Since" header field can be used to make a request
851   method conditional by modification date: if the selected representation
852   has been modified since the time specified in this field, then the
853   server MUST NOT perform the requested operation and MUST instead
854   respond with the <xref target="status.412" format="none">412 (Precondition Failed)</xref> status code.
855   If the selected representation has not been modified since the time
856   specified in this field, the server SHOULD perform the request
857   method as if the If-Unmodified-Since header field were not present.
858</t>
859<figure><iref primary="true" item="Grammar" subitem="If-Unmodified-Since"/><artwork type="abnf2616"><![CDATA[
860  If-Unmodified-Since = HTTP-date
861]]></artwork></figure>
862<t>
863   An example of the field is:
864</t>
865<figure><artwork type="example"><![CDATA[
866  If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
867]]></artwork></figure>
868<t>
869   If a request normally (i.e., in absence of the If-Unmodified-Since
870   header field) would result in anything other than a 2xx (Successful)
871   or <xref target="status.412" format="none">412 (Precondition Failed)</xref> status code,
872   the If-Unmodified-Since header field SHOULD be ignored.
873</t>
874<t>
875   If the specified date is invalid, the header field MUST be ignored.
876</t>
877</section>
878
879<section title="If-Range" anchor="header.if-range">
880<t>
881   The "If-Range" header field provides a special conditional request
882   mechanism that is similar to <xref target="header.if-match" format="none">If-Match</xref> and
883   <xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref> but specific to HTTP range requests.
884   If-Range is defined in Section 5.3 of <xref target="Part5"/>.
885</t>
886</section>
887
888</section>
889
890<section title="Status Code Definitions" anchor="status.code.definitions">
891<section title="304 Not Modified" anchor="status.304">
892  <iref primary="true" item="304 Not Modified (status code)"/>
893 
894 
895<t>
896   The 304 status code indicates that a conditional GET request has been
897   received and would have resulted in a 200 (OK) response if it were not
898   for the fact that the condition has evaluated to false.  In other words,
899   there is no need for the server to transfer a representation of the
900   target resource because the client's request indicates that it already
901   has a valid representation, as indicated by the 304 response header
902   fields, and is therefore redirecting the client to make use of that
903   stored representation as if it were the payload of a 200 response.
904   The 304 response MUST NOT contain a message-body, and thus is always
905   terminated by the first empty line after the header fields.
906</t>
907<t>
908   A 304 response MUST include a Date header field
909   (Section 8.1.1.2 of <xref target="Part2"/>) unless the origin server does not have a clock that can
910   provide a reasonable approximation of the current time.  If a 200
911   (OK) response to the same request would have included any of the
912   header fields Cache-Control, Content-Location,
913   <xref target="header.etag" format="none">ETag</xref>, Expires, or Vary, then
914   those same header fields MUST be sent in a 304 response.
915</t>
916<t>
917   Since the goal of a 304 response is to minimize information transfer
918   when the recipient already has one or more cached representations,
919   the response SHOULD NOT include representation metadata other
920   than the above listed fields unless said metadata exists for the
921   purpose of guiding cache updates (e.g., future HTTP extensions).
922</t>
923<t>
924   If the recipient of a 304 response does not have a cached representation
925   corresponding to the entity-tag indicated by the 304 response, then the
926   recipient MUST NOT use the 304 to update its own cache.  If this
927   conditional request originated with an outbound client, such as a user agent
928   with its own cache sending a conditional GET to a shared proxy, then the 304
929   response MAY be forwarded to that client.  Otherwise, the recipient MUST
930   disregard the 304 response and repeat the request without any preconditions.
931</t>
932<t>
933   If a cache uses a received 304 response to update a cache entry, the
934   cache MUST update the entry to reflect any new field values given in
935   the response.
936</t>
937</section>
938
939<section title="412 Precondition Failed" anchor="status.412">
940  <iref primary="true" item="412 Precondition Failed (status code)"/>
941 
942<t>
943   The 412 status code indicates that one or more preconditions given in
944   the request header fields evaluated to false when tested on the server.
945   This response code allows the client to place preconditions on the
946   current resource state (its current representations and metadata)
947   and thus prevent the request method from being applied if the target
948   resource is in an unexpected state.
949</t>
950</section>
951</section>
952
953<section title="Precedence" anchor="precedence">
954<t>
955   When more than one conditional request header field is present in a request,
956   the order in which the fields are evaluated becomes important. In practice,
957   the fields defined in this document are consistently implemented in a
958   single, logical order, due to the fact that entity tags are presumed to be
959   more accurate than date validators. For example, the only reason to send
960   both <xref target="header.if-modified-since" format="none">If-Modified-Since</xref> and <xref target="header.if-none-match" format="none">If-None-Match</xref> in the same GET request is to
961   support intermediary caches that might not have implemented <xref target="header.if-none-match" format="none">If-None-Match</xref>,
962   so it makes sense to ignore the <xref target="header.if-modified-since" format="none">If-Modified-Since</xref> when entity tags are
963   understood and available for the selected representation.
964</t>
965<t>
966   The general rule of conditional precedence is that exact match conditions
967   are evaluated before cache-validating conditions and, within that order,
968   last-modified conditions are only evaluated if the corresponding
969   entity tag condition is not present (or not applicable because the
970   selected representation does not have an entity tag).
971</t>
972<t>
973   Specifically, the fields defined by this specification are evaluated
974   as follows:
975   <list style="numbers">
976     <t>When <xref target="header.if-match" format="none">If-Match</xref> is present, evaluate it:
977       <list style="symbols">
978         <t>if true, continue to step 3</t>
979         <t>if false, respond <xref target="status.412" format="none">412 (Precondition Failed)</xref></t>
980       </list>
981     </t>
982     <t>When <xref target="header.if-match" format="none">If-Match</xref> is not present and
983        <xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref> is present, evaluate it:
984       <list style="symbols">
985         <t>if true, continue to step 3</t>
986         <t>if false, respond <xref target="status.412" format="none">412 (Precondition Failed)</xref></t>
987       </list>
988     </t>
989     <t>When the method is GET and both Range and
990        If-Range are present, evaluate it:
991       <list style="symbols">
992         <t>if the validator matches, respond 206 (Partial Content)</t>
993         <t>if the validator does not match, respond 200 (OK)</t>
994       </list>
995     </t>
996     <t>When <xref target="header.if-none-match" format="none">If-None-Match</xref> is present, evaluate it:
997       <list style="symbols">
998         <t>if true, all conditions are met</t>
999         <t>if false for GET/HEAD, respond <xref target="status.304" format="none">304 (Not Modified)</xref></t>
1000         <t>if false for other methods, respond <xref target="status.412" format="none">412 (Precondition Failed)</xref></t>
1001       </list>
1002     </t>
1003     <t>When the method is GET or HEAD,
1004        <xref target="header.if-none-match" format="none">If-None-Match</xref> is not present, and
1005        <xref target="header.if-modified-since" format="none">If-Modified-Since</xref> is present, evaluate it:
1006       <list style="symbols">
1007         <t>if true, all conditions are met</t>
1008         <t>if false, respond <xref target="status.304" format="none">304 (Not Modified)</xref></t>
1009       </list>
1010     </t>
1011   </list>
1012</t>
1013<t>
1014   Any extension to HTTP/1.1 that defines additional conditional request
1015   header fields ought to define its own expectations regarding the order
1016   for evaluating such fields in relation to those defined in this document
1017   and other conditionals that might be found in practice.
1018</t>
1019</section>
1020
1021<section title="IANA Considerations" anchor="IANA.considerations">
1022
1023<section title="Status Code Registration" anchor="status.code.registration">
1024<t>
1025   The HTTP Status Code Registry located at <eref target="http://www.iana.org/assignments/http-status-codes"/>
1026   shall be updated with the registrations below:
1027</t>
1028
1029<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
1030<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
1031   <ttcol>Value</ttcol>
1032   <ttcol>Description</ttcol>
1033   <ttcol>Reference</ttcol>
1034   <c>304</c>
1035   <c>Not Modified</c>
1036   <c>
1037      <xref target="status.304"/>
1038   </c>
1039   <c>412</c>
1040   <c>Precondition Failed</c>
1041   <c>
1042      <xref target="status.412"/>
1043   </c>
1044</texttable>
1045<!--(END)-->
1046
1047</section>
1048
1049<section title="Header Field Registration" anchor="header.field.registration">
1050<t>
1051   The Message Header Field Registry located at <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/> shall be updated
1052   with the permanent registrations below (see <xref target="RFC3864"/>):
1053</t>
1054
1055<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
1056<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
1057   <ttcol>Header Field Name</ttcol>
1058   <ttcol>Protocol</ttcol>
1059   <ttcol>Status</ttcol>
1060   <ttcol>Reference</ttcol>
1061
1062   <c>ETag</c>
1063   <c>http</c>
1064   <c>standard</c>
1065   <c>
1066      <xref target="header.etag"/>
1067   </c>
1068   <c>If-Match</c>
1069   <c>http</c>
1070   <c>standard</c>
1071   <c>
1072      <xref target="header.if-match"/>
1073   </c>
1074   <c>If-Modified-Since</c>
1075   <c>http</c>
1076   <c>standard</c>
1077   <c>
1078      <xref target="header.if-modified-since"/>
1079   </c>
1080   <c>If-None-Match</c>
1081   <c>http</c>
1082   <c>standard</c>
1083   <c>
1084      <xref target="header.if-none-match"/>
1085   </c>
1086   <c>If-Unmodified-Since</c>
1087   <c>http</c>
1088   <c>standard</c>
1089   <c>
1090      <xref target="header.if-unmodified-since"/>
1091   </c>
1092   <c>Last-Modified</c>
1093   <c>http</c>
1094   <c>standard</c>
1095   <c>
1096      <xref target="header.last-modified"/>
1097   </c>
1098</texttable>
1099<!--(END)-->
1100
1101<t>
1102   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
1103</t>
1104</section>
1105</section>
1106
1107<section title="Security Considerations" anchor="security.considerations">
1108<t>
1109   No additional security considerations have been identified beyond
1110   those applicable to HTTP in general <xref target="Part1"/>.
1111</t>
1112<t>
1113   The validators defined by this specification are not intended to ensure
1114   the validity of a representation, guard against malicious changes, or
1115   detect man-in-the-middle attacks. At best, they enable more efficient cache
1116   updates and optimistic concurrent writes when all participants are behaving
1117   nicely. At worst, the conditions will fail and the client will receive a
1118   response that is no more harmful than an HTTP exchange without conditional
1119   requests.
1120</t>
1121</section>
1122
1123<section title="Acknowledgments" anchor="acks">
1124<t>
1125  See Section 9 of <xref target="Part1"/>.
1126</t>
1127</section>
1128</middle>
1129<back>
1130
1131<references title="Normative References">
1132
1133<reference anchor="Part1">
1134  <front>
1135    <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
1136    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1137      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1138      <address><email>fielding@gbiv.com</email></address>
1139    </author>
1140    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1141      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1142      <address><email>julian.reschke@greenbytes.de</email></address>
1143    </author>
1144    <date month="October" year="2012"/>
1145  </front>
1146  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-21"/>
1147 
1148</reference>
1149
1150<reference anchor="Part2">
1151  <front>
1152    <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
1153    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1154      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1155      <address><email>fielding@gbiv.com</email></address>
1156    </author>
1157    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1158      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1159      <address><email>julian.reschke@greenbytes.de</email></address>
1160    </author>
1161    <date month="October" year="2012"/>
1162  </front>
1163  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-21"/>
1164 
1165</reference>
1166
1167<reference anchor="Part5">
1168  <front>
1169    <title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
1170    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1171      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1172      <address><email>fielding@gbiv.com</email></address>
1173    </author>
1174    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1175      <organization abbrev="W3C">World Wide Web Consortium</organization>
1176      <address><email>ylafon@w3.org</email></address>
1177    </author>
1178    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1179      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1180      <address><email>julian.reschke@greenbytes.de</email></address>
1181    </author>
1182    <date month="October" year="2012"/>
1183  </front>
1184  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-21"/>
1185 
1186</reference>
1187
1188<reference anchor="Part6">
1189  <front>
1190    <title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
1191    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1192      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1193      <address><email>fielding@gbiv.com</email></address>
1194    </author>
1195    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
1196      <organization>Akamai</organization>
1197      <address><email>mnot@mnot.net</email></address>
1198    </author>
1199    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1200      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1201      <address><email>julian.reschke@greenbytes.de</email></address>
1202    </author>
1203    <date month="October" year="2012"/>
1204  </front>
1205  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-21"/>
1206 
1207</reference>
1208
1209<reference anchor="RFC2119">
1210  <front>
1211    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1212    <author initials="S." surname="Bradner" fullname="Scott Bradner">
1213      <organization>Harvard University</organization>
1214      <address><email>sob@harvard.edu</email></address>
1215    </author>
1216    <date month="March" year="1997"/>
1217  </front>
1218  <seriesInfo name="BCP" value="14"/>
1219  <seriesInfo name="RFC" value="2119"/>
1220</reference>
1221
1222<reference anchor="RFC5234">
1223  <front>
1224    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
1225    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
1226      <organization>Brandenburg InternetWorking</organization>
1227      <address>
1228        <email>dcrocker@bbiw.net</email>
1229      </address> 
1230    </author>
1231    <author initials="P." surname="Overell" fullname="Paul Overell">
1232      <organization>THUS plc.</organization>
1233      <address>
1234        <email>paul.overell@thus.net</email>
1235      </address>
1236    </author>
1237    <date month="January" year="2008"/>
1238  </front>
1239  <seriesInfo name="STD" value="68"/>
1240  <seriesInfo name="RFC" value="5234"/>
1241</reference>
1242
1243</references>
1244
1245<references title="Informative References">
1246
1247<reference anchor="RFC2616">
1248  <front>
1249    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1250    <author initials="R." surname="Fielding" fullname="R. Fielding">
1251      <organization>University of California, Irvine</organization>
1252      <address><email>fielding@ics.uci.edu</email></address>
1253    </author>
1254    <author initials="J." surname="Gettys" fullname="J. Gettys">
1255      <organization>W3C</organization>
1256      <address><email>jg@w3.org</email></address>
1257    </author>
1258    <author initials="J." surname="Mogul" fullname="J. Mogul">
1259      <organization>Compaq Computer Corporation</organization>
1260      <address><email>mogul@wrl.dec.com</email></address>
1261    </author>
1262    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
1263      <organization>MIT Laboratory for Computer Science</organization>
1264      <address><email>frystyk@w3.org</email></address>
1265    </author>
1266    <author initials="L." surname="Masinter" fullname="L. Masinter">
1267      <organization>Xerox Corporation</organization>
1268      <address><email>masinter@parc.xerox.com</email></address>
1269    </author>
1270    <author initials="P." surname="Leach" fullname="P. Leach">
1271      <organization>Microsoft Corporation</organization>
1272      <address><email>paulle@microsoft.com</email></address>
1273    </author>
1274    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
1275      <organization>W3C</organization>
1276      <address><email>timbl@w3.org</email></address>
1277    </author>
1278    <date month="June" year="1999"/>
1279  </front>
1280  <seriesInfo name="RFC" value="2616"/>
1281</reference>
1282
1283<reference anchor="RFC3864">
1284  <front>
1285    <title>Registration Procedures for Message Header Fields</title>
1286    <author initials="G." surname="Klyne" fullname="G. Klyne">
1287      <organization>Nine by Nine</organization>
1288      <address><email>GK-IETF@ninebynine.org</email></address>
1289    </author>
1290    <author initials="M." surname="Nottingham" fullname="M. Nottingham">
1291      <organization>BEA Systems</organization>
1292      <address><email>mnot@pobox.com</email></address>
1293    </author>
1294    <author initials="J." surname="Mogul" fullname="J. Mogul">
1295      <organization>HP Labs</organization>
1296      <address><email>JeffMogul@acm.org</email></address>
1297    </author>
1298    <date year="2004" month="September"/>
1299  </front>
1300  <seriesInfo name="BCP" value="90"/>
1301  <seriesInfo name="RFC" value="3864"/>
1302</reference>
1303
1304<reference anchor="RFC4918">
1305  <front>
1306    <title>HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</title>
1307    <author initials="L.M." surname="Dusseault" fullname="Lisa Dusseault" role="editor">
1308      <organization abbrev="CommerceNet">CommerceNet</organization>
1309      <address><email>ldusseault@commerce.net</email></address>
1310    </author>
1311    <date month="June" year="2007"/>
1312  </front>
1313  <seriesInfo name="RFC" value="4918"/>
1314</reference>
1315</references>
1316
1317<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
1318<t>
1319  Allow weak entity-tags in all requests except range requests (Sections
1320  <xref target="weak.and.strong.validators" format="counter"/> and
1321  <xref target="header.if-none-match" format="counter"/>).
1322</t>
1323<t>
1324  Change "<xref target="header.etag" format="none">ETag</xref>" header field ABNF not to use quoted-string, thus
1325  avoiding escaping issues.
1326  (<xref target="header.etag"/>)
1327</t>
1328</section>
1329
1330<section title="Imported ABNF" anchor="imported.abnf">
1331 
1332 
1333 
1334 
1335 
1336 
1337 
1338 
1339 
1340 
1341 
1342<t>
1343  The following core rules are included by
1344  reference, as defined in Appendix B.1 of <xref target="RFC5234"/>:
1345  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
1346  DIGIT (decimal 0-9), DQUOTE (double quote),
1347  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
1348  OCTET (any 8-bit sequence of data), SP (space), and
1349  VCHAR (any visible US-ASCII character).
1350</t>
1351<t>
1352  The rules below are defined in <xref target="Part1"/>:
1353</t>
1354<figure><artwork type="abnf2616"><![CDATA[
1355  OWS           = <OWS, defined in [Part1], Section 3.2.1>
1356  obs-text      = <obs-text, defined in [Part1], Section 3.2.4>
1357]]></artwork></figure>
1358<t>
1359  The rules below are defined in other parts:
1360</t>
1361<figure><artwork type="abnf2616"><![CDATA[
1362  HTTP-date     = <HTTP-date, defined in [Part2], Section 8.1.1.1>
1363]]></artwork></figure>
1364</section>
1365
1366
1367<section title="Collected ABNF" anchor="collected.abnf">
1368<figure>
1369<artwork type="abnf" name="p4-conditional.parsed-abnf"><![CDATA[
1370ETag = entity-tag
1371
1372HTTP-date = <HTTP-date, defined in [Part2], Section 8.1.1.1>
1373
1374If-Match = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
1375 entity-tag ] ) )
1376If-Modified-Since = HTTP-date
1377If-None-Match = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
1378 entity-tag ] ) )
1379If-Unmodified-Since = HTTP-date
1380
1381Last-Modified = HTTP-date
1382
1383OWS = <OWS, defined in [Part1], Section 3.2.1>
1384
1385entity-tag = [ weak ] opaque-tag
1386etagc = "!" / %x23-7E ; '#'-'~'
1387 / obs-text
1388
1389obs-text = <obs-text, defined in [Part1], Section 3.2.4>
1390opaque-tag = DQUOTE *etagc DQUOTE
1391
1392weak = %x57.2F ; W/
1393]]></artwork>
1394</figure>
1395</section>
1396
1397
1398<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
1399<t>
1400  Changes up to the first Working Group Last Call draft are summarized
1401  in <eref target="http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-19#appendix-C"/>.
1402</t>
1403
1404<section title="Since draft-ietf-httpbis-p4-conditional-19" anchor="changes.since.19">
1405<t>
1406  Closed issues:
1407  <list style="symbols">
1408    <t>
1409      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/241"/>:
1410      "Need to clarify eval order/interaction of conditional headers"
1411    </t>
1412    <t>
1413      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/345"/>:
1414      "Required headers on 304 and 206"
1415    </t>
1416    <t>
1417      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/350"/>:
1418      "Optionality of Conditional Request Support"
1419    </t>
1420    <t>
1421      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/354"/>:
1422      "ETags and Conditional Requests"
1423    </t>
1424    <t>
1425      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/361"/>:
1426      "ABNF requirements for recipients"
1427    </t>
1428    <t>
1429      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/363"/>:
1430      "Rare cases"
1431    </t>
1432    <t>
1433      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/365"/>:
1434      "Conditional Request Security Considerations"
1435    </t>
1436    <t>
1437      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/371"/>:
1438      "If-Modified-Since lacks definition for method != GET"
1439    </t>
1440    <t>
1441      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/372"/>:
1442      "refactor conditional header field descriptions"
1443    </t>
1444  </list>
1445</t>
1446</section>
1447
1448<section title="Since draft-ietf-httpbis-p4-conditional-20" anchor="changes.since.20">
1449<t>
1450  <list style="symbols">
1451    <t>
1452      Conformance criteria and considerations regarding error handling are
1453      now defined in Part 1.
1454    </t>
1455  </list>
1456</t>
1457</section>
1458
1459</section>
1460
1461</back>
1462</rfc>
Note: See TracBrowser for help on using the repository browser.