source: draft-ietf-httpbis/22/draft-ietf-httpbis-p4-conditional-22.xml @ 2561

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

prepare -22 for release

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 62.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-22">
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="February" year="2013" day="23"/>
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.21"/>.
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 and avoid confusing cache behavior.
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: Thu, 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: Thu, 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.  This is a variation
694   on the "lost update" problem that might arise if more than one client
695   attempts to create an initial representation for the target resource.
696</t>
697<figure><iref primary="true" item="Grammar" subitem="If-None-Match"/><artwork type="abnf2616"><![CDATA[
698  If-None-Match = "*" / 1#entity-tag
699]]></artwork></figure>
700<t>
701   The If-None-Match condition is met if and only if none of the entity-tags
702   listed in the If-None-Match field value match the entity-tag of the selected
703   representation using the weak comparison function (as per <xref target="entity.tag.comparison"/>), or if "*" is given and no current
704   representation exists for that resource.
705</t>
706<t>
707   If the condition is not met, the server MUST NOT perform the requested
708   method. Instead, if the request method was GET or HEAD, the server SHOULD
709   respond with a <xref target="status.304" format="none">304 (Not Modified)</xref> status code, including the
710   cache-related header fields (particularly <xref target="header.etag" format="none">ETag</xref>) of the
711   selected representation that has a matching entity-tag. For all other
712   request methods, the server MUST respond with a <xref target="status.412" format="none">412 (Precondition
713   Failed)</xref> status code when the condition is not met.
714</t>
715<t>
716   If the condition is met, the server MAY perform the requested method and
717   MUST ignore any <xref target="header.if-modified-since" format="none">If-Modified-Since</xref> header field(s) in the
718   request. That is, if no entity-tags match, then the server MUST NOT send
719   a <xref target="status.304" format="none">304 (Not Modified)</xref> response.
720</t>
721<t>
722   Examples:
723</t>
724<figure><artwork type="example"><![CDATA[
725  If-None-Match: "xyzzy"
726  If-None-Match: W/"xyzzy"
727  If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
728  If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
729  If-None-Match: *
730]]></artwork></figure>
731</section>
732
733<section title="If-Modified-Since" anchor="header.if-modified-since">
734  <iref primary="true" item="If-Modified-Since header field"/>
735 
736<t>
737   The "If-Modified-Since" header field can be used with GET or HEAD to make
738   the method conditional by modification date: if the selected representation
739   has not been modified since the time specified in this field, then
740   do not perform the request method; instead, respond as detailed below.
741</t>
742<figure><iref primary="true" item="Grammar" subitem="If-Modified-Since"/><artwork type="abnf2616"><![CDATA[
743  If-Modified-Since = HTTP-date
744]]></artwork></figure>
745<t>
746   An example of the field is:
747</t>
748<figure><artwork type="example"><![CDATA[
749  If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
750]]></artwork></figure>
751<t>
752   A GET method with an If-Modified-Since header field and no Range
753   header field requests that the selected representation be transferred only if
754   it has been modified since the date given by the If-Modified-Since
755   header field.
756   The algorithm for determining this includes the following cases:
757  <list style="numbers">
758      <t>If the request would normally result in anything other than a
759         200 (OK) status code, or if the passed If-Modified-Since date is
760         invalid, the response is exactly the same as for a normal GET.
761         A date that is later than the server's current time is
762         invalid.</t>
763
764      <t>If the selected representation has been modified since the
765         If-Modified-Since date, the response is exactly the same as for
766         a normal GET.</t>
767
768      <t>If the selected representation has not been modified since a valid
769         If-Modified-Since date, the server SHOULD send a
770         <xref target="status.304" format="none">304 (Not Modified)</xref> response.</t>
771  </list>
772</t>
773<t>
774   The two purposes of this feature are to allow efficient updates of cached
775   information, with a minimum amount of transaction overhead, and to limit
776   the scope of a web traversal to resources that have recently changed.
777</t>
778<t>
779   When used for cache updates, a cache will typically use the value of the
780   cached message's <xref target="header.last-modified" format="none">Last-Modified</xref> field to generate the field
781   value of If-Modified-Since. This behavior is most interoperable for cases
782   where clocks are poorly synchronized or when the server has chosen to only
783   honor exact timestamp matches (due to a problem with Last-Modified dates
784   that appear to go "back in time" when the origin server's clock is
785   corrected or a representation is restored from an archived backup).
786   However, caches occasionally generate the field value based on other data,
787   such as the Date header field of the cached message or the
788   local clock time that the message was received, particularly when the
789   cached message does not contain a <xref target="header.last-modified" format="none">Last-Modified</xref> field.
790</t>
791<t>
792   When used for limiting the scope of retrieval to a recent time window, a
793   user agent will generate an If-Modified-Since field value based on either
794   its own local clock or a Date header field received from the
795   server during a past run. Origin servers that choose an exact timestamp
796   match based on the selected representation's <xref target="header.last-modified" format="none">Last-Modified</xref>
797   field will not be able to help the user agent limit its data transfers to
798   only those changed during the specified window.
799</t>
800<t><list>
801  <t>
802     Note: If a client uses an arbitrary date in the If-Modified-Since
803     header field instead of a date taken from a <xref target="header.last-modified" format="none">Last-Modified</xref>
804     or Date header field from the origin server, the client
805     ought to be aware that its date will be interpreted according to the
806     server's understanding of time.
807  </t>
808</list></t>
809</section>
810
811<section title="If-Unmodified-Since" anchor="header.if-unmodified-since">
812  <iref primary="true" item="If-Unmodified-Since header field"/>
813 
814<t>
815   The "If-Unmodified-Since" header field can be used to make a request
816   method conditional by modification date: if the selected representation
817   has been modified since the time specified in this field, then the
818   server MUST NOT perform the requested operation and MUST instead
819   respond with the <xref target="status.412" format="none">412 (Precondition Failed)</xref> status code.
820   If the selected representation has not been modified since the time
821   specified in this field, the server MAY perform the request.
822</t>
823<figure><iref primary="true" item="Grammar" subitem="If-Unmodified-Since"/><artwork type="abnf2616"><![CDATA[
824  If-Unmodified-Since = HTTP-date
825]]></artwork></figure>
826<t>
827   An example of the field is:
828</t>
829<figure><artwork type="example"><![CDATA[
830  If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
831]]></artwork></figure>
832<t>
833   A server MUST ignore the If-Unmodified-Since header field if the
834   received value is not a valid HTTP-date.
835</t>
836</section>
837
838<section title="If-Range" anchor="header.if-range">
839<t>
840   The "If-Range" header field provides a special conditional request
841   mechanism that is similar to <xref target="header.if-match" format="none">If-Match</xref> and
842   <xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref> but specific to range requests.
843   If-Range is defined in Section 3.2 of <xref target="Part5"/>.
844</t>
845</section>
846
847</section>
848
849<section title="Status Code Definitions" anchor="status.code.definitions">
850<section title="304 Not Modified" anchor="status.304">
851  <iref primary="true" item="304 Not Modified (status code)"/>
852 
853 
854<t>
855   The 304 (Not Modified) status code indicates that a conditional GET request has been
856   received and would have resulted in a 200 (OK) response
857   if it were not for the fact that the condition has evaluated to false.
858   In other words, there is no need for the server to transfer a
859   representation of the target resource because the request indicates that
860   the client, which made the request conditional, already has a valid
861   representation; the server is therefore redirecting the client to make
862   use of that stored representation as if it were the payload of a
863   200 (OK) response.
864</t>
865<t>
866   The server generating a 304 response MUST generate any of the following
867   header fields that would have been sent in a 200 (OK)
868   response to the same request:
869   Cache-Control,
870   Content-Location,
871   <xref target="header.etag" format="none">ETag</xref>,
872   Expires, and
873   Vary.
874</t>
875<t>
876   Since the goal of a 304 response is to minimize information transfer
877   when the recipient already has one or more cached representations,
878   a sender SHOULD NOT generate representation metadata other
879   than the above listed fields unless said metadata exists for the
880   purpose of guiding cache updates (e.g., <xref target="header.last-modified" format="none">Last-Modified</xref> might
881   be useful if the response does not have an <xref target="header.etag" format="none">ETag</xref> field).
882</t>
883<t>
884   Requirements on a cache that receives a 304 response are defined in
885   Section 4.2.1 of <xref target="Part6"/>. If the conditional request originated with an
886   outbound client, such as a user agent with its own cache sending a
887   conditional GET to a shared proxy, then the proxy SHOULD forward the
888   304 response to that client.
889</t>
890<t>
891   A 304 response cannot contain a message-body; it is always
892   terminated by the first empty line after the header fields.
893</t>
894</section>
895
896<section title="412 Precondition Failed" anchor="status.412">
897  <iref primary="true" item="412 Precondition Failed (status code)"/>
898 
899<t>
900   The 412 (Precondition Failed) status code indicates that one
901   or more preconditions given in the request header fields evaluated to false
902   when tested on the server. This response code allows the client to place
903   preconditions on the current resource state (its current representations
904   and metadata) and thus prevent the request method from being applied if the
905   target resource is in an unexpected state.
906</t>
907</section>
908</section>
909
910<section title="Evaluation and Precedence" anchor="precedence">
911<t>
912   For each conditional request, a server MUST evaluate the request
913   preconditions after it has successfully performed its normal request checks
914   (i.e., just before it would perform the action associated with the request
915   method). Preconditions are ignored if the server determines that an error
916   or redirect response applies before they are evaluated. Otherwise, the
917   evaluation depends on both the method semantics and the choice of
918   conditional.
919</t>
920<t>
921   A conditional request header field that is designed specifically for cache
922   validation, which includes <xref target="header.if-none-match" format="none">If-None-Match</xref> and
923   <xref target="header.if-modified-since" format="none">If-Modified-Since</xref> when used in a GET or HEAD request,
924   allows cached representations to be refreshed without repeatedly
925   transferring data already held by the client. Evaluating to false is thus
926   an indication that the client can continue to use its local copy of the
927   selected representation, as indicated by the server generating a
928   <xref target="status.304" format="none">304 (Not Modified)</xref> response that includes only those header
929   fields useful for refreshing the cached representation.
930</t>
931<t>
932   All other conditionals are intended to signal failure when the
933   precondition evaluates to false. For example, an <xref target="header.if-match" format="none">If-Match</xref>
934   conditional sent with a state-changing method (e.g., POST, PUT, DELETE) is
935   intended to prevent the request from taking effect on the target resource
936   if the resource state does not match the expected state. In other words,
937   evaluating the condition to false means that the resource has been changed
938   by some other client, perhaps by another user attempting to edit the same
939   resource, and thus preventing the request from being applied saves the
940   client from overwriting some other client's work. This result is indicated
941   by the server generating a <xref target="status.412" format="none">412 (Precondition Failed)</xref>
942   response.
943</t>
944<t>
945   The conditional request header fields defined by this specification are
946   ignored for request methods that never involve the selection or
947   modification of a selected representation (e.g., CONNECT,
948   OPTIONS, and TRACE). Other conditional request header fields, defined by
949   extensions to HTTP, might place conditions on the state of the target
950   resource in general, or on a group of resources. For instance, the If header
951   field in WebDAV can make a request conditional on various aspects (such
952   as locks) of multiple resources
953   (<xref target="RFC4918"/>, Section 10.4).
954</t>
955<t>
956   When more than one conditional request header field is present in a request,
957   the order in which the fields are evaluated becomes important. In practice,
958   the fields defined in this document are consistently implemented in a
959   single, logical order, due to the fact that entity tags are presumed to be
960   more accurate than date validators. For example, the only reason to send
961   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
962   the same GET request is to support intermediary caches that might not have
963   implemented <xref target="header.if-none-match" format="none">If-None-Match</xref>, so it makes sense to ignore the
964   <xref target="header.if-modified-since" format="none">If-Modified-Since</xref> when entity tags are understood and
965   available for the selected representation.
966</t>
967<t>
968   The general rule of conditional precedence is that exact match conditions
969   are evaluated before cache-validating conditions and, within that order,
970   last-modified conditions are only evaluated if the corresponding
971   entity tag condition is not present (or not applicable because the
972   selected representation does not have an entity tag).
973</t>
974<t>
975   Specifically, the fields defined by this specification are evaluated
976   as follows:
977   <list style="numbers">
978     <t>When <xref target="header.if-match" format="none">If-Match</xref> is present, evaluate it:
979       <list style="symbols">
980         <t>if true, continue to step 3</t>
981         <t>if false, respond <xref target="status.412" format="none">412 (Precondition Failed)</xref></t>
982       </list>
983     </t>
984     <t>When <xref target="header.if-match" format="none">If-Match</xref> is not present and
985        <xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref> is present, evaluate it:
986       <list style="symbols">
987         <t>if true, continue to step 3</t>
988         <t>if false, respond <xref target="status.412" format="none">412 (Precondition Failed)</xref></t>
989       </list>
990     </t>
991     <t>When <xref target="header.if-none-match" format="none">If-None-Match</xref> is present, evaluate it:
992       <list style="symbols">
993         <t>if true, continue to step 5</t>
994         <t>if false for GET/HEAD, respond <xref target="status.304" format="none">304 (Not Modified)</xref></t>
995         <t>if false for other methods, respond <xref target="status.412" format="none">412 (Precondition Failed)</xref></t>
996       </list>
997     </t>
998     <t>When the method is GET or HEAD,
999        <xref target="header.if-none-match" format="none">If-None-Match</xref> is not present, and
1000        <xref target="header.if-modified-since" format="none">If-Modified-Since</xref> is present, evaluate it:
1001       <list style="symbols">
1002         <t>if true, continue to step 5</t>
1003         <t>if false, respond <xref target="status.304" format="none">304 (Not Modified)</xref></t>
1004       </list>
1005     </t>
1006     <t>When the method is GET and both Range and
1007        If-Range are present, evaluate If-Range:
1008       <list style="symbols">
1009         <t>if the validator matches and the Range specification is
1010            applicable to the selected representation, respond
1011            206 (Partial Content) <xref target="Part5"/></t>
1012       </list>
1013     </t>
1014     <t>Otherwise,
1015       <list style="symbols">
1016         <t>all conditions are met, so perform the requested action and
1017            respond according to its success or failure.</t>
1018       </list>
1019     </t>
1020   </list>
1021</t>
1022<t>
1023   Any extension to HTTP/1.1 that defines additional conditional request
1024   header fields ought to define its own expectations regarding the order
1025   for evaluating such fields in relation to those defined in this document
1026   and other conditionals that might be found in practice.
1027</t>
1028</section>
1029
1030<section title="IANA Considerations" anchor="IANA.considerations">
1031
1032<section title="Status Code Registration" anchor="status.code.registration">
1033<t>
1034   The HTTP Status Code Registry located at <eref target="http://www.iana.org/assignments/http-status-codes"/>
1035   shall be updated with the registrations below:
1036</t>
1037
1038<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
1039<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
1040   <ttcol>Value</ttcol>
1041   <ttcol>Description</ttcol>
1042   <ttcol>Reference</ttcol>
1043   <c>304</c>
1044   <c>Not Modified</c>
1045   <c>
1046      <xref target="status.304"/>
1047   </c>
1048   <c>412</c>
1049   <c>Precondition Failed</c>
1050   <c>
1051      <xref target="status.412"/>
1052   </c>
1053</texttable>
1054<!--(END)-->
1055
1056</section>
1057
1058<section title="Header Field Registration" anchor="header.field.registration">
1059<t>
1060   The Message Header Field Registry located at <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/> shall be updated
1061   with the permanent registrations below (see <xref target="BCP90"/>):
1062</t>
1063
1064<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
1065<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
1066   <ttcol>Header Field Name</ttcol>
1067   <ttcol>Protocol</ttcol>
1068   <ttcol>Status</ttcol>
1069   <ttcol>Reference</ttcol>
1070
1071   <c>ETag</c>
1072   <c>http</c>
1073   <c>standard</c>
1074   <c>
1075      <xref target="header.etag"/>
1076   </c>
1077   <c>If-Match</c>
1078   <c>http</c>
1079   <c>standard</c>
1080   <c>
1081      <xref target="header.if-match"/>
1082   </c>
1083   <c>If-Modified-Since</c>
1084   <c>http</c>
1085   <c>standard</c>
1086   <c>
1087      <xref target="header.if-modified-since"/>
1088   </c>
1089   <c>If-None-Match</c>
1090   <c>http</c>
1091   <c>standard</c>
1092   <c>
1093      <xref target="header.if-none-match"/>
1094   </c>
1095   <c>If-Unmodified-Since</c>
1096   <c>http</c>
1097   <c>standard</c>
1098   <c>
1099      <xref target="header.if-unmodified-since"/>
1100   </c>
1101   <c>Last-Modified</c>
1102   <c>http</c>
1103   <c>standard</c>
1104   <c>
1105      <xref target="header.last-modified"/>
1106   </c>
1107</texttable>
1108<!--(END)-->
1109
1110<t>
1111   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
1112</t>
1113</section>
1114</section>
1115
1116<section title="Security Considerations" anchor="security.considerations">
1117<t>
1118   This section is meant to inform developers, information providers, and
1119   users of known security concerns specific to the HTTP/1.1 conditional
1120   request mechanisms. More general security considerations are addressed
1121   in HTTP messaging <xref target="Part1"/> and semantics <xref target="Part2"/>.
1122</t>
1123<t>
1124   The validators defined by this specification are not intended to ensure
1125   the validity of a representation, guard against malicious changes, or
1126   detect man-in-the-middle attacks. At best, they enable more efficient cache
1127   updates and optimistic concurrent writes when all participants are behaving
1128   nicely. At worst, the conditions will fail and the client will receive a
1129   response that is no more harmful than an HTTP exchange without conditional
1130   requests.
1131</t>
1132<t>
1133   An entity-tag can be abused in ways that create privacy risks. For example,
1134   a site might deliberately construct a semantically invalid entity-tag that
1135   is unique to the user or user agent, send it in a cacheable response with a
1136   long freshness time, and then read that entity-tag in later conditional
1137   requests as a means of re-identifying that user or user agent. Such an
1138   identifying tag would become a persistent identifier for as long as the
1139   user agent retained the original cache entry. User agents that cache
1140   representations ought to ensure that the cache is cleared or replaced
1141   whenever the user performs privacy-maintaining actions, such as clearing
1142   stored cookies or changing to a private browsing mode.
1143</t>
1144</section>
1145
1146<section title="Acknowledgments" anchor="acks">
1147<t>
1148  See Section 9 of <xref target="Part1"/>.
1149</t>
1150</section>
1151</middle>
1152<back>
1153
1154<references title="Normative References">
1155
1156<reference anchor="Part1">
1157  <front>
1158    <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
1159    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1160      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1161      <address><email>fielding@gbiv.com</email></address>
1162    </author>
1163    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1164      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1165      <address><email>julian.reschke@greenbytes.de</email></address>
1166    </author>
1167    <date month="February" year="2013"/>
1168  </front>
1169  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-22"/>
1170 
1171</reference>
1172
1173<reference anchor="Part2">
1174  <front>
1175    <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
1176    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1177      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1178      <address><email>fielding@gbiv.com</email></address>
1179    </author>
1180    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1181      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1182      <address><email>julian.reschke@greenbytes.de</email></address>
1183    </author>
1184    <date month="February" year="2013"/>
1185  </front>
1186  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-22"/>
1187 
1188</reference>
1189
1190<reference anchor="Part5">
1191  <front>
1192    <title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
1193    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1194      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1195      <address><email>fielding@gbiv.com</email></address>
1196    </author>
1197    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1198      <organization abbrev="W3C">World Wide Web Consortium</organization>
1199      <address><email>ylafon@w3.org</email></address>
1200    </author>
1201    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1202      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1203      <address><email>julian.reschke@greenbytes.de</email></address>
1204    </author>
1205    <date month="February" year="2013"/>
1206  </front>
1207  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-22"/>
1208 
1209</reference>
1210
1211<reference anchor="Part6">
1212  <front>
1213    <title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
1214    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1215      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1216      <address><email>fielding@gbiv.com</email></address>
1217    </author>
1218    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
1219      <organization>Akamai</organization>
1220      <address><email>mnot@mnot.net</email></address>
1221    </author>
1222    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1223      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1224      <address><email>julian.reschke@greenbytes.de</email></address>
1225    </author>
1226    <date month="February" year="2013"/>
1227  </front>
1228  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-22"/>
1229 
1230</reference>
1231
1232<reference anchor="RFC2119">
1233  <front>
1234    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1235    <author initials="S." surname="Bradner" fullname="Scott Bradner">
1236      <organization>Harvard University</organization>
1237      <address><email>sob@harvard.edu</email></address>
1238    </author>
1239    <date month="March" year="1997"/>
1240  </front>
1241  <seriesInfo name="BCP" value="14"/>
1242  <seriesInfo name="RFC" value="2119"/>
1243</reference>
1244
1245<reference anchor="RFC5234">
1246  <front>
1247    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
1248    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
1249      <organization>Brandenburg InternetWorking</organization>
1250      <address>
1251        <email>dcrocker@bbiw.net</email>
1252      </address> 
1253    </author>
1254    <author initials="P." surname="Overell" fullname="Paul Overell">
1255      <organization>THUS plc.</organization>
1256      <address>
1257        <email>paul.overell@thus.net</email>
1258      </address>
1259    </author>
1260    <date month="January" year="2008"/>
1261  </front>
1262  <seriesInfo name="STD" value="68"/>
1263  <seriesInfo name="RFC" value="5234"/>
1264</reference>
1265
1266</references>
1267
1268<references title="Informative References">
1269
1270<reference anchor="RFC2616">
1271  <front>
1272    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1273    <author initials="R." surname="Fielding" fullname="R. Fielding">
1274      <organization>University of California, Irvine</organization>
1275      <address><email>fielding@ics.uci.edu</email></address>
1276    </author>
1277    <author initials="J." surname="Gettys" fullname="J. Gettys">
1278      <organization>W3C</organization>
1279      <address><email>jg@w3.org</email></address>
1280    </author>
1281    <author initials="J." surname="Mogul" fullname="J. Mogul">
1282      <organization>Compaq Computer Corporation</organization>
1283      <address><email>mogul@wrl.dec.com</email></address>
1284    </author>
1285    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
1286      <organization>MIT Laboratory for Computer Science</organization>
1287      <address><email>frystyk@w3.org</email></address>
1288    </author>
1289    <author initials="L." surname="Masinter" fullname="L. Masinter">
1290      <organization>Xerox Corporation</organization>
1291      <address><email>masinter@parc.xerox.com</email></address>
1292    </author>
1293    <author initials="P." surname="Leach" fullname="P. Leach">
1294      <organization>Microsoft Corporation</organization>
1295      <address><email>paulle@microsoft.com</email></address>
1296    </author>
1297    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
1298      <organization>W3C</organization>
1299      <address><email>timbl@w3.org</email></address>
1300    </author>
1301    <date month="June" year="1999"/>
1302  </front>
1303  <seriesInfo name="RFC" value="2616"/>
1304</reference>
1305
1306<reference anchor="BCP90">
1307  <front>
1308    <title>Registration Procedures for Message Header Fields</title>
1309    <author initials="G." surname="Klyne" fullname="G. Klyne">
1310      <organization>Nine by Nine</organization>
1311      <address><email>GK-IETF@ninebynine.org</email></address>
1312    </author>
1313    <author initials="M." surname="Nottingham" fullname="M. Nottingham">
1314      <organization>BEA Systems</organization>
1315      <address><email>mnot@pobox.com</email></address>
1316    </author>
1317    <author initials="J." surname="Mogul" fullname="J. Mogul">
1318      <organization>HP Labs</organization>
1319      <address><email>JeffMogul@acm.org</email></address>
1320    </author>
1321    <date year="2004" month="September"/>
1322  </front>
1323  <seriesInfo name="BCP" value="90"/>
1324  <seriesInfo name="RFC" value="3864"/>
1325</reference>
1326
1327<reference anchor="RFC4918">
1328  <front>
1329    <title>HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</title>
1330    <author initials="L.M." surname="Dusseault" fullname="Lisa Dusseault" role="editor">
1331      <organization abbrev="CommerceNet">CommerceNet</organization>
1332      <address><email>ldusseault@commerce.net</email></address>
1333    </author>
1334    <date month="June" year="2007"/>
1335  </front>
1336  <seriesInfo name="RFC" value="4918"/>
1337</reference>
1338</references>
1339
1340<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
1341<t>
1342  The definition of validator weakness has been expanded and clarified.
1343  (<xref target="weak.and.strong.validators"/>)
1344</t>
1345<t>
1346  Weak entity-tags are now allowed in all requests except range requests
1347  (Sections <xref target="weak.and.strong.validators" format="counter"/> and
1348  <xref target="header.if-none-match" format="counter"/>).
1349</t>
1350<t>
1351  The <xref target="header.etag" format="none">ETag</xref> header field ABNF has been changed to not use
1352  quoted-string, thus avoiding escaping issues.
1353  (<xref target="header.etag"/>)
1354</t>
1355<t>
1356  ETag is defined to provide an entity tag for the selected representation,
1357  thereby clarifying what it applies to in various situations (such as a
1358  PUT response).
1359  (<xref target="header.etag"/>)
1360</t>
1361<t>
1362  The precedence for evaluation of conditional requests has been defined.
1363  (<xref target="precedence"/>)
1364</t>
1365</section>
1366
1367<section title="Imported ABNF" anchor="imported.abnf">
1368 
1369 
1370 
1371 
1372 
1373 
1374 
1375 
1376 
1377 
1378 
1379<t>
1380  The following core rules are included by
1381  reference, as defined in Appendix B.1 of <xref target="RFC5234"/>:
1382  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
1383  DIGIT (decimal 0-9), DQUOTE (double quote),
1384  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
1385  OCTET (any 8-bit sequence of data), SP (space), and
1386  VCHAR (any visible US-ASCII character).
1387</t>
1388<t>
1389  The rules below are defined in <xref target="Part1"/>:
1390</t>
1391<figure><artwork type="abnf2616"><![CDATA[
1392  OWS           = <OWS, defined in [Part1], Section 3.2.3>
1393  obs-text      = <obs-text, defined in [Part1], Section 3.2.6>
1394]]></artwork></figure>
1395<t>
1396  The rules below are defined in other parts:
1397</t>
1398<figure><artwork type="abnf2616"><![CDATA[
1399  HTTP-date     = <HTTP-date, defined in [Part2], Section 7.1.1.1>
1400]]></artwork></figure>
1401</section>
1402
1403
1404<section title="Collected ABNF" anchor="collected.abnf">
1405<figure>
1406<artwork type="abnf" name="p4-conditional.parsed-abnf"><![CDATA[
1407ETag = entity-tag
1408
1409HTTP-date = <HTTP-date, defined in [Part2], Section 7.1.1.1>
1410
1411If-Match = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
1412 entity-tag ] ) )
1413If-Modified-Since = HTTP-date
1414If-None-Match = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
1415 entity-tag ] ) )
1416If-Unmodified-Since = HTTP-date
1417
1418Last-Modified = HTTP-date
1419
1420OWS = <OWS, defined in [Part1], Section 3.2.3>
1421
1422entity-tag = [ weak ] opaque-tag
1423etagc = "!" / %x23-7E ; '#'-'~'
1424 / obs-text
1425
1426obs-text = <obs-text, defined in [Part1], Section 3.2.6>
1427opaque-tag = DQUOTE *etagc DQUOTE
1428
1429weak = %x57.2F ; W/
1430]]></artwork>
1431</figure>
1432</section>
1433
1434
1435<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
1436<t>
1437  Changes up to the first Working Group Last Call draft are summarized
1438  in <eref target="http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-19#appendix-C"/>.
1439</t>
1440
1441<section title="Since draft-ietf-httpbis-p4-conditional-19" anchor="changes.since.19">
1442<t>
1443  Closed issues:
1444  <list style="symbols">
1445    <t>
1446      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/241"/>:
1447      "Need to clarify eval order/interaction of conditional headers"
1448    </t>
1449    <t>
1450      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/345"/>:
1451      "Required headers on 304 and 206"
1452    </t>
1453    <t>
1454      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/350"/>:
1455      "Optionality of Conditional Request Support"
1456    </t>
1457    <t>
1458      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/354"/>:
1459      "ETags and Conditional Requests"
1460    </t>
1461    <t>
1462      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/361"/>:
1463      "ABNF requirements for recipients"
1464    </t>
1465    <t>
1466      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/363"/>:
1467      "Rare cases"
1468    </t>
1469    <t>
1470      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/365"/>:
1471      "Conditional Request Security Considerations"
1472    </t>
1473    <t>
1474      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/371"/>:
1475      "If-Modified-Since lacks definition for method != GET"
1476    </t>
1477    <t>
1478      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/372"/>:
1479      "refactor conditional header field descriptions"
1480    </t>
1481  </list>
1482</t>
1483</section>
1484
1485<section title="Since draft-ietf-httpbis-p4-conditional-20" anchor="changes.since.20">
1486<t>
1487  <list style="symbols">
1488    <t>
1489      Conformance criteria and considerations regarding error handling are
1490      now defined in Part 1.
1491    </t>
1492  </list>
1493</t>
1494</section>
1495
1496<section title="Since draft-ietf-httpbis-p4-conditional-21" anchor="changes.since.21">
1497<t>
1498  Closed issues:
1499  <list style="symbols">
1500    <t>
1501      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/96"/>:
1502      "Conditional GET text"
1503    </t>
1504    <t>
1505      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/350"/>:
1506      "Optionality of Conditional Request Support"
1507    </t>
1508    <t>
1509      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/384"/>:
1510      "unclear prose in definition of 304"
1511    </t>
1512    <t>
1513      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/401"/>:
1514      "ETags and Conneg"
1515    </t>
1516    <t>
1517      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/402"/>:
1518      "Comparison function for If-Match and If-None-Match"
1519    </t>
1520    <t>
1521      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/406"/>:
1522      "304 without validator"
1523    </t>
1524    <t>
1525      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/427"/>:
1526      "If-Match and 428"
1527    </t>
1528  </list>
1529</t>
1530</section>
1531
1532<!--<section title="Since draft-ietf-httpbis-p4-conditional-22" anchor="changes.since.22">
1533<t>
1534  None yet.
1535</t>
1536</section>-->
1537</section>
1538
1539</back>
1540</rfc>
Note: See TracBrowser for help on using the repository browser.