source: draft-ietf-httpbis/23/draft-ietf-httpbis-p4-conditional-23.xml @ 2323

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

prepare release of -23

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