source: draft-ietf-httpbis/latest/p4-conditional.xml @ 741

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

Update to latest version of xml2rfc and rfc2629.xslt, bump document dates

  • Property svn:eol-style set to native
File size: 64.0 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
3<!DOCTYPE rfc [
4  <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>">
14  <!ENTITY ID-VERSION "latest">
15  <!ENTITY ID-MONTH "January">
16  <!ENTITY ID-YEAR "2010">
17  <!ENTITY notation                   "<xref target='Part1' x:rel='#notation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
18  <!ENTITY notation-abnf              "<xref target='Part1' x:rel='#notation.abnf' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
19  <!ENTITY basic-rules                "<xref target='Part1' x:rel='#basic.rules' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
20  <!ENTITY header-date                "<xref target='Part1' x:rel='#header.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
21  <!ENTITY messaging                  "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
22  <!ENTITY caching                    "<xref target='Part6' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
23  <!ENTITY header-if-range            "<xref target='Part5' x:rel='#header.if-range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
24  <!ENTITY header-range               "<xref target='Part5' x:rel='#header.range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
25  <!ENTITY header-vary                "<xref target='Part6' x:rel='#header.vary' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
26  <!ENTITY clockless                  "<xref target='Part1' x:rel='#clockless.origin.server.operation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
27  <!ENTITY full-date                  "<xref target='Part1' x:rel='#date.time.formats.full.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
28]>
29<?rfc toc="yes" ?>
30<?rfc symrefs="yes" ?>
31<?rfc sortrefs="yes" ?>
32<?rfc compact="yes"?>
33<?rfc subcompact="no" ?>
34<?rfc linkmailto="no" ?>
35<?rfc editing="no" ?>
36<?rfc comments="yes"?>
37<?rfc inline="yes"?>
38<?rfc-ext allow-markup-in-artwork="yes" ?>
39<?rfc-ext include-references-in-index="yes" ?>
40<rfc obsoletes="2616" category="std" x:maturity-level="draft"
41     ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"
42     xmlns:x='http://purl.org/net/xml2rfc/ext'>
43<front>
44
45  <title abbrev="HTTP/1.1, Part 4">HTTP/1.1, part 4: Conditional Requests</title>
46
47  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
48    <organization abbrev="Day Software">Day Software</organization>
49    <address>
50      <postal>
51        <street>23 Corporate Plaza DR, Suite 280</street>
52        <city>Newport Beach</city>
53        <region>CA</region>
54        <code>92660</code>
55        <country>USA</country>
56      </postal>
57      <phone>+1-949-706-5300</phone>
58      <facsimile>+1-949-706-5305</facsimile>
59      <email>fielding@gbiv.com</email>
60      <uri>http://roy.gbiv.com/</uri>
61    </address>
62  </author>
63
64  <author initials="J." surname="Gettys" fullname="Jim Gettys">
65    <organization>One Laptop per Child</organization>
66    <address>
67      <postal>
68        <street>21 Oak Knoll Road</street>
69        <city>Carlisle</city>
70        <region>MA</region>
71        <code>01741</code>
72        <country>USA</country>
73      </postal>
74      <email>jg@laptop.org</email>
75      <uri>http://www.laptop.org/</uri>
76    </address>
77  </author>
78 
79  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
80    <organization abbrev="HP">Hewlett-Packard Company</organization>
81    <address>
82      <postal>
83        <street>HP Labs, Large Scale Systems Group</street>
84        <street>1501 Page Mill Road, MS 1177</street>
85        <city>Palo Alto</city>
86        <region>CA</region>
87        <code>94304</code>
88        <country>USA</country>
89      </postal>
90      <email>JeffMogul@acm.org</email>
91    </address>
92  </author>
93
94  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
95    <organization abbrev="Microsoft">Microsoft Corporation</organization>
96    <address>
97      <postal>
98        <street>1 Microsoft Way</street>
99        <city>Redmond</city>
100        <region>WA</region>
101        <code>98052</code>
102        <country>USA</country>
103      </postal>
104      <email>henrikn@microsoft.com</email>
105    </address>
106  </author>
107
108  <author initials="L." surname="Masinter" fullname="Larry Masinter">
109    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
110    <address>
111      <postal>
112        <street>345 Park Ave</street>
113        <city>San Jose</city>
114        <region>CA</region>
115        <code>95110</code>
116        <country>USA</country>
117      </postal>
118      <email>LMM@acm.org</email>
119      <uri>http://larry.masinter.net/</uri>
120    </address>
121  </author>
122 
123  <author initials="P." surname="Leach" fullname="Paul J. Leach">
124    <organization abbrev="Microsoft">Microsoft Corporation</organization>
125    <address>
126      <postal>
127        <street>1 Microsoft Way</street>
128        <city>Redmond</city>
129        <region>WA</region>
130        <code>98052</code>
131      </postal>
132      <email>paulle@microsoft.com</email>
133    </address>
134  </author>
135   
136  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
137    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
138    <address>
139      <postal>
140        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
141        <street>The Stata Center, Building 32</street>
142        <street>32 Vassar Street</street>
143        <city>Cambridge</city>
144        <region>MA</region>
145        <code>02139</code>
146        <country>USA</country>
147      </postal>
148      <email>timbl@w3.org</email>
149      <uri>http://www.w3.org/People/Berners-Lee/</uri>
150    </address>
151  </author>
152
153  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
154    <organization abbrev="W3C">World Wide Web Consortium</organization>
155    <address>
156      <postal>
157        <street>W3C / ERCIM</street>
158        <street>2004, rte des Lucioles</street>
159        <city>Sophia-Antipolis</city>
160        <region>AM</region>
161        <code>06902</code>
162        <country>France</country>
163      </postal>
164      <email>ylafon@w3.org</email>
165      <uri>http://www.raubacapeu.net/people/yves/</uri>
166    </address>
167  </author>
168
169  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
170    <organization abbrev="greenbytes">greenbytes GmbH</organization>
171    <address>
172      <postal>
173        <street>Hafenweg 16</street>
174        <city>Muenster</city><region>NW</region><code>48155</code>
175        <country>Germany</country>
176      </postal>
177      <phone>+49 251 2807760</phone>
178      <facsimile>+49 251 2807761</facsimile>
179      <email>julian.reschke@greenbytes.de</email>
180      <uri>http://greenbytes.de/tech/webdav/</uri>
181    </address>
182  </author>
183
184  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
185  <workgroup>HTTPbis Working Group</workgroup>
186
187<abstract>
188<t>
189   The Hypertext Transfer Protocol (HTTP) is an application-level
190   protocol for distributed, collaborative, hypermedia information
191   systems. HTTP has been in use by the World Wide Web global information
192   initiative since 1990. This document is Part 4 of the seven-part specification
193   that defines the protocol referred to as "HTTP/1.1" and, taken together,
194   obsoletes RFC 2616.  Part 4 defines request header fields for
195   indicating conditional requests and the rules for constructing responses
196   to those requests.
197</t>
198</abstract>
199
200<note title="Editorial Note (To be removed by RFC Editor)">
201  <t>
202    Discussion of this draft should take place on the HTTPBIS working group
203    mailing list (ietf-http-wg@w3.org). The current issues list is
204    at <eref target="http://tools.ietf.org/wg/httpbis/trac/report/11"/>
205    and related documents (including fancy diffs) can be found at
206    <eref target="http://tools.ietf.org/wg/httpbis/"/>.
207  </t>
208  <t>
209    The changes in this draft are summarized in <xref target="changes.since.08"/>.
210  </t>
211</note>
212</front>
213<middle>
214<section title="Introduction" anchor="introduction">
215<t>
216   This document defines HTTP/1.1 response metadata for indicating potential
217   changes to payload content, including modification time stamps and opaque
218   entity-tags, and the HTTP conditional request mechanisms that allow
219   preconditions to be placed on a request method.  Conditional GET requests
220   allow for efficient cache updates.  Other conditional request methods are
221   used to protect against overwriting or misunderstanding the state of a
222   resource that has been changed unbeknownst to the requesting client.
223</t>
224<t>
225   This document is currently disorganized in order to minimize the changes
226   between drafts and enable reviewers to see the smaller errata changes.
227   The next draft will reorganize the sections to better reflect the content.
228   In particular, the sections on resource metadata will be discussed first
229   and then followed by each conditional request-header, concluding with a
230   definition of precedence and the expectation of ordering strong validator
231   checks before weak validator checks.  It is likely that more content from
232   &caching; will migrate to this part, where appropriate.
233   The current mess reflects how widely dispersed these topics and associated
234   requirements had become in <xref target="RFC2616"/>.
235</t>
236
237<section title="Requirements" anchor="intro.requirements">
238<t>
239   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
240   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
241   document are to be interpreted as described in <xref target="RFC2119"/>.
242</t>
243<t>
244   An implementation is not compliant if it fails to satisfy one or more
245   of the &MUST; or &REQUIRED; level requirements for the protocols it
246   implements. An implementation that satisfies all the &MUST; or &REQUIRED;
247   level and all the &SHOULD; level requirements for its protocols is said
248   to be "unconditionally compliant"; one that satisfies all the &MUST;
249   level requirements but not all the &SHOULD; level requirements for its
250   protocols is said to be "conditionally compliant."
251</t>
252</section>
253
254<section title="Syntax Notation" anchor="notation">
255  <x:anchor-alias value="ALPHA"/>
256  <x:anchor-alias value="CR"/>
257  <x:anchor-alias value="DIGIT"/>
258  <x:anchor-alias value="LF"/>
259  <x:anchor-alias value="OCTET"/>
260  <x:anchor-alias value="VCHAR"/>
261  <x:anchor-alias value="WSP"/>
262<t>
263  This specification uses the ABNF syntax defined in &notation; (which
264  extends the syntax defined in <xref target="RFC5234"/> with a list rule).
265  <xref target="collected.abnf"/> shows the collected ABNF, with the list
266  rule expanded.
267</t>
268<t>
269  The following core rules are included by
270  reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
271  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
272  DIGIT (decimal 0-9), DQUOTE (double quote),
273  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
274  OCTET (any 8-bit sequence of data), SP (space),
275  VCHAR (any visible USASCII character),
276  and WSP (whitespace).
277</t>
278
279<section title="Core Rules" anchor="core.rules">
280  <x:anchor-alias value="quoted-string"/>
281  <x:anchor-alias value="OWS"/>
282<t>
283  The core rules below are defined in &basic-rules;:
284</t>
285<figure><artwork type="abnf2616">
286  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &basic-rules;&gt;
287  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &basic-rules;&gt;
288</artwork></figure>
289</section>
290
291<section title="ABNF Rules defined in other Parts of the Specification" anchor="abnf.dependencies">
292  <x:anchor-alias value="HTTP-date"/>
293<t>
294  The ABNF rules below are defined in other parts:
295</t>
296<figure><!--Part1--><artwork type="abnf2616">
297  <x:ref>HTTP-date</x:ref>     = &lt;HTTP-date, defined in &full-date;&gt;
298</artwork></figure>
299</section>
300
301</section>
302
303</section>
304
305<section title="Entity Tags" anchor="entity.tags">
306  <x:anchor-alias value="entity-tag"/>
307  <x:anchor-alias value="opaque-tag"/>
308  <x:anchor-alias value="weak"/>
309<t>
310   Entity tags are used for comparing two or more entities from the same
311   requested resource. HTTP/1.1 uses entity tags in the ETag (<xref target="header.etag"/>),
312   If-Match (<xref target="header.if-match"/>), If-None-Match (<xref target="header.if-none-match"/>), and
313   If-Range (&header-if-range;) header fields. The definition of how they
314   are used and compared as cache validators is in <xref target="weak.and.strong.validators"/>. An
315   entity tag consists of an opaque quoted string, possibly prefixed by
316   a weakness indicator.
317</t>
318<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="entity-tag"/><iref primary="true" item="Grammar" subitem="weak"/><iref primary="true" item="Grammar" subitem="opaque-tag"/>
319  <x:ref>entity-tag</x:ref> = [ <x:ref>weak</x:ref> ] <x:ref>opaque-tag</x:ref>
320  <x:ref>weak</x:ref>       = <x:abnf-char-sequence>"W/"</x:abnf-char-sequence> ; "W/", case-sensitive
321  <x:ref>opaque-tag</x:ref> = <x:ref>quoted-string</x:ref>
322</artwork></figure>
323<t>
324   A "strong entity tag" &MAY; be shared by two entities of a resource
325   only if they are equivalent by octet equality.
326</t>
327<t>
328   A "weak entity tag," indicated by the "W/" prefix, &MAY; be shared by
329   two entities of a resource only if the entities are equivalent and
330   could be substituted for each other with no significant change in
331   semantics. A weak entity tag can only be used for weak comparison.
332</t>
333<t>
334   An entity tag &MUST; be unique across all versions of all entities
335   associated with a particular resource. A given entity tag value &MAY;
336   be used for entities obtained by requests on different URIs. The use
337   of the same entity tag value in conjunction with entities obtained by
338   requests on different URIs does not imply the equivalence of those
339   entities.
340</t>
341</section>
342
343<section title="Status Code Definitions">
344<section title="304 Not Modified" anchor="status.304">
345  <iref primary="true" item="304 Not Modified (status code)" x:for-anchor=""/>
346  <iref primary="true" item="Status Codes" subitem="304 Not Modified" x:for-anchor=""/>
347<t>
348   If the client has performed a conditional GET request and access is
349   allowed, but the document has not been modified, the server &SHOULD;
350   respond with this status code. The 304 response &MUST-NOT; contain a
351   message-body, and thus is always terminated by the first empty line
352   after the header fields.
353</t>
354<t>
355   The response &MUST; include the following header fields:
356  <list style="symbols">
357    <x:lt>
358      <t>Date, unless its omission is required by &clockless;.</t>
359      <t>
360         If a clockless origin server obeys these rules, and proxies and
361         clients add their own Date to any response received without one (as
362         already specified by &header-date;, caches will operate
363         correctly.</t>
364    </x:lt>
365    <x:lt>
366      <t>ETag and/or Content-Location, if the header would have been sent
367         in a 200 response to the same request.</t>
368    </x:lt>
369    <x:lt>
370      <t>Expires, Cache-Control, and/or Vary, if the field-value might
371         differ from that sent in any previous response for the same
372         variant.</t>
373    </x:lt>
374  </list>
375</t>
376<t>
377   If the conditional GET used a strong cache validator (see <xref target="weak.and.strong.validators"/>),
378   the response &SHOULD-NOT;  include other entity-headers.
379   Otherwise (i.e., the conditional GET used a weak validator), the
380   response &MUST-NOT; include other entity-headers; this prevents
381   inconsistencies between cached entity-bodies and updated headers.
382</t>
383<t>
384   If a 304 response indicates an entity not currently cached, then the
385   cache &MUST; disregard the response and repeat the request without the
386   conditional.
387</t>
388<t>
389   If a cache uses a received 304 response to update a cache entry, the
390   cache &MUST; update the entry to reflect any new field values given in
391   the response.
392</t>
393</section>
394
395<section title="412 Precondition Failed" anchor="status.412">
396  <iref primary="true" item="412 Precondition Failed (status code)" x:for-anchor=""/>
397  <iref primary="true" item="Status Codes" subitem="412 Precondition Failed" x:for-anchor=""/>
398<t>
399   The precondition given in one or more of the request-header fields
400   evaluated to false when it was tested on the server. This response
401   code allows the client to place preconditions on the current resource
402   metainformation (header field data) and thus prevent the requested
403   method from being applied to a resource other than the one intended.
404</t>
405</section>
406</section>
407
408<section title="Weak and Strong Validators" anchor="weak.and.strong.validators">
409<t>
410   Since both origin servers and caches will compare two validators to
411   decide if they represent the same or different entities, one normally
412   would expect that if the entity (the entity-body or any entity-headers)
413   changes in any way, then the associated validator would
414   change as well. If this is true, then we call this validator a
415   "strong validator."
416</t>
417<t>
418   However, there might be cases when a server prefers to change the
419   validator only on semantically significant changes, and not when
420   insignificant aspects of the entity change. A validator that does not
421   always change when the resource changes is a "weak validator."
422</t>
423<t>
424   Entity tags are normally "strong validators," but the protocol
425   provides a mechanism to tag an entity tag as "weak." One can think of
426   a strong validator as one that changes whenever the bits of an entity
427   changes, while a weak value changes whenever the meaning of an entity
428   changes. Alternatively, one can think of a strong validator as part
429   of an identifier for a specific entity, while a weak validator is
430   part of an identifier for a set of semantically equivalent entities.
431  <list><t>
432      <x:h>Note:</x:h> One example of a strong validator is an integer that is
433      incremented in stable storage every time an entity is changed.
434    </t><t>
435      An entity's modification time, if represented with one-second
436      resolution, could be a weak validator, since it is possible that
437      the resource might be modified twice during a single second.
438    </t><t>
439      Support for weak validators is optional. However, weak validators
440      allow for more efficient caching of equivalent objects; for
441      example, a hit counter on a site is probably good enough if it is
442      updated every few days or weeks, and any value during that period
443      is likely "good enough" to be equivalent.
444    </t></list>
445</t>
446<t>
447   A "use" of a validator is either when a client generates a request
448   and includes the validator in a validating header field, or when a
449   server compares two validators.
450</t>
451<t>
452   Strong validators are usable in any context. Weak validators are only
453   usable in contexts that do not depend on exact equality of an entity.
454   For example, either kind is usable for a conditional GET of a full
455   entity. However, only a strong validator is usable for a sub-range
456   retrieval, since otherwise the client might end up with an internally
457   inconsistent entity.
458</t>
459<t>
460   Clients &MUST-NOT; use weak validators in range requests (<xref target="Part5"/>).
461</t>
462<t>
463   The only function that HTTP/1.1 defines on validators is
464   comparison. There are two validator comparison functions, depending
465   on whether the comparison context allows the use of weak validators
466   or not:
467  <list style="symbols">
468     <t>The strong comparison function: in order to be considered equal,
469        both opaque-tags &MUST; be identical character-by-character, and both
470        &MUST-NOT; be weak.</t>
471     <t>The weak comparison function: in order to be considered equal, both
472        opaque-tags &MUST; be identical character-by-character, but
473        either or both of them &MAY; be tagged as "weak" without affecting
474        the result.</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<t>
508   An entity tag is strong unless it is explicitly tagged as weak.
509   <xref target="entity.tags"/> gives the syntax for entity tags.
510</t>
511<t>
512   A Last-Modified time, when used as a validator in a request, is
513   implicitly weak unless it is possible to deduce that it is strong,
514   using the following rules:
515  <list style="symbols">
516     <t>The validator is being compared by an origin server to the
517        actual current validator for the entity and,</t>
518     <t>That origin server reliably knows that the associated entity did
519        not change twice during the second covered by the presented
520        validator.</t>
521  </list>
522</t>
523<t>
524   or
525  <list style="symbols">
526     <t>The validator is about to be used by a client in an If-Modified-Since
527        or If-Unmodified-Since header, because the client
528        has a cache entry for the associated entity, and</t>
529     <t>That cache entry includes a Date value, which gives the time
530        when the origin server sent the original response, and</t>
531     <t>The presented Last-Modified time is at least 60 seconds before
532        the Date value.</t>
533  </list>
534</t>
535<t>
536   or
537  <list style="symbols">
538     <t>The validator is being compared by an intermediate cache to the
539        validator stored in its cache entry for the entity, and</t>
540     <t>That cache entry includes a Date value, which gives the time
541        when the origin server sent the original response, and</t>
542     <t>The presented Last-Modified time is at least 60 seconds before
543        the Date value.</t>
544  </list>
545</t>
546<t>
547   This method relies on the fact that if two different responses were
548   sent by the origin server during the same second, but both had the
549   same Last-Modified time, then at least one of those responses would
550   have a Date value equal to its Last-Modified time. The arbitrary 60-second
551   limit guards against the possibility that the Date and Last-Modified
552   values are generated from different clocks, or at somewhat
553   different times during the preparation of the response. An
554   implementation &MAY; use a value larger than 60 seconds, if it is
555   believed that 60 seconds is too short.
556</t>
557<t>
558   If a client wishes to perform a sub-range retrieval on a value for
559   which it has only a Last-Modified time and no opaque validator, it
560   &MAY; do this only if the Last-Modified time is strong in the sense
561   described here.
562</t>
563<t>
564   A cache or origin server receiving a conditional range request
565   (<xref target="Part5"/>) &MUST; use the strong comparison function to
566   evaluate the condition.
567</t>
568<t>
569   These rules allow HTTP/1.1 caches and clients to safely perform sub-range
570   retrievals on values that have been obtained from HTTP/1.0
571   servers.
572</t>
573</section>
574
575<section title="Rules for When to Use Entity Tags and Last-Modified Dates" anchor="rules.for.when.to.use.entity.tags.and.last-modified.dates">
576<t>
577   We adopt a set of rules and recommendations for origin servers,
578   clients, and caches regarding when various validator types ought to
579   be used, and for what purposes.
580</t>
581<t>
582   HTTP/1.1 origin servers:
583  <list style="symbols">
584     <t>&SHOULD; send an entity tag validator unless it is not feasible to
585        generate one.</t>
586
587     <t>&MAY; send a weak entity tag instead of a strong entity tag, if
588        performance considerations support the use of weak entity tags,
589        or if it is unfeasible to send a strong entity tag.</t>
590
591     <t>&SHOULD; send a Last-Modified value if it is feasible to send one,
592        unless the risk of a breakdown in semantic transparency that
593        could result from using this date in an If-Modified-Since header
594        would lead to serious problems.</t>
595  </list>
596</t>
597<t>
598   In other words, the preferred behavior for an HTTP/1.1 origin server
599   is to send both a strong entity tag and a Last-Modified value.
600</t>
601<t>
602   In order to be legal, a strong entity tag &MUST; change whenever the
603   associated entity changes in any way. A weak entity tag &SHOULD;
604   change whenever the associated entity changes in a semantically
605   significant way.
606</t>
607<x:note>
608  <t>
609    <x:h>Note:</x:h> in order to provide semantically transparent caching, an
610    origin server must avoid reusing a specific strong entity tag
611    value for two different entities, or reusing a specific weak
612    entity tag value for two semantically different entities. Cache
613    entries might persist for arbitrarily long periods, regardless of
614    expiration times, so it might be inappropriate to expect that a
615    cache will never again attempt to validate an entry using a
616    validator that it obtained at some point in the past.
617  </t>
618</x:note>
619<t>
620   HTTP/1.1 clients:
621  <list style="symbols">
622     <t>If an entity tag has been provided by the origin server, &MUST;
623        use that entity tag in any cache-conditional request (using If-Match
624        or If-None-Match).</t>
625
626     <t>If only a Last-Modified value has been provided by the origin
627        server, &SHOULD; use that value in non-subrange cache-conditional
628        requests (using If-Modified-Since).</t>
629
630     <t>If only a Last-Modified value has been provided by an HTTP/1.0
631        origin server, &MAY; use that value in subrange cache-conditional
632        requests (using If-Unmodified-Since:). The user agent &SHOULD;
633        provide a way to disable this, in case of difficulty.</t>
634
635     <t>If both an entity tag and a Last-Modified value have been
636        provided by the origin server, &SHOULD; use both validators in
637        cache-conditional requests. This allows both HTTP/1.0 and
638        HTTP/1.1 caches to respond appropriately.</t>
639  </list>
640</t>
641<t>
642   An HTTP/1.1 origin server, upon receiving a conditional request that
643   includes both a Last-Modified date (e.g., in an If-Modified-Since or
644   If-Unmodified-Since header field) and one or more entity tags (e.g.,
645   in an If-Match, If-None-Match, or If-Range header field) as cache
646   validators, &MUST-NOT; return a response status of 304 (Not Modified)
647   unless doing so is consistent with all of the conditional header
648   fields in the request.
649</t>
650<t>
651   An HTTP/1.1 caching proxy, upon receiving a conditional request that
652   includes both a Last-Modified date and one or more entity tags as
653   cache validators, &MUST-NOT; return a locally cached response to the
654   client unless that cached response is consistent with all of the
655   conditional header fields in the request.
656  <list><t>
657      <x:h>Note:</x:h> The general principle behind these rules is that HTTP/1.1
658      servers and clients should transmit as much non-redundant
659      information as is available in their responses and requests.
660      HTTP/1.1 systems receiving this information will make the most
661      conservative assumptions about the validators they receive.
662  </t><t>
663      HTTP/1.0 clients and caches will ignore entity tags. Generally,
664      last-modified values received or used by these systems will
665      support transparent and efficient caching, and so HTTP/1.1 origin
666      servers should provide Last-Modified values. In those rare cases
667      where the use of a Last-Modified value as a validator by an
668      HTTP/1.0 system could result in a serious problem, then HTTP/1.1
669      origin servers should not provide one.
670  </t></list>
671</t>
672</section>
673
674<section title="Header Field Definitions" anchor="header.fields">
675<t>
676   This section defines the syntax and semantics of HTTP/1.1 header fields
677   related to conditional requests.
678</t>
679<t>
680   For entity-header fields, both sender and recipient refer to either the
681   client or the server, depending on who sends and who receives the entity.
682</t>
683
684<section title="ETag" anchor="header.etag">
685  <iref primary="true" item="ETag header" x:for-anchor=""/>
686  <iref primary="true" item="Headers" subitem="ETag" x:for-anchor=""/>
687  <x:anchor-alias value="ETag"/>
688  <x:anchor-alias value="ETag-v"/>
689<t>
690   The "ETag" response-header field provides the current value of the
691   entity tag (see <xref target="entity.tags"/>) for the requested variant,
692   which may be used for comparison with other entities from the same resource
693   (see <xref target="weak.and.strong.validators"/>).
694</t>
695<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="ETag"/><iref primary="true" item="Grammar" subitem="ETag-v"/>
696  <x:ref>ETag</x:ref>   = "ETag" ":" <x:ref>OWS</x:ref> <x:ref>ETag-v</x:ref>
697  <x:ref>ETag-v</x:ref> = <x:ref>entity-tag</x:ref>
698</artwork></figure>
699<figure><preamble>
700  Examples:
701</preamble>
702<artwork type="example">
703  ETag: "xyzzy"
704  ETag: W/"xyzzy"
705  ETag: ""
706</artwork></figure>
707<t>
708   The ETag response-header field value, an entity tag, provides for an
709   "opaque" cache validator. This might allow more reliable validation
710   in situations where it is inconvenient to store modification dates,
711   where the one-second resolution of HTTP date values is not
712   sufficient, or where the origin server wishes to avoid certain
713   paradoxes that might arise from the use of modification dates.
714</t>
715<t>
716   The principle behind entity tags is that only the service author
717   knows the semantics of a resource well enough to select an
718   appropriate cache validation mechanism, and the specification of any
719   validator comparison function more complex than byte-equality would
720   open up a can of worms. Thus, comparisons of any other headers
721   (except Last-Modified, for compatibility with HTTP/1.0) are never
722   used for purposes of validating a cache entry.
723</t>
724</section>
725
726<section title="If-Match" anchor="header.if-match">
727  <iref primary="true" item="If-Match header" x:for-anchor=""/>
728  <iref primary="true" item="Headers" subitem="If-Match" x:for-anchor=""/>
729  <x:anchor-alias value="If-Match"/>
730  <x:anchor-alias value="If-Match-v"/>
731<t>
732   The "If-Match" request-header field is used to make a request method
733   conditional. A client that has one or more entities previously
734   obtained from the resource can verify that one of those entities is
735   current by including a list of their associated entity tags in the
736   If-Match header field.
737</t>
738<t>
739   This allows efficient updates of cached information with a minimum amount of
740   transaction overhead. It is also used when updating resources, to prevent
741   inadvertent modification of the wrong version of a resource. As a special
742   case, the value "*" matches any current entity of the resource.
743</t>
744<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Match"/><iref primary="true" item="Grammar" subitem="If-Match-v"/>
745  <x:ref>If-Match</x:ref>   = "If-Match" ":" <x:ref>OWS</x:ref> <x:ref>If-Match-v</x:ref>
746  <x:ref>If-Match-v</x:ref> = "*" / 1#<x:ref>entity-tag</x:ref>
747</artwork></figure>
748<t>
749   If any of the entity tags match the entity tag of the entity that
750   would have been returned in the response to a similar GET request
751   (without the If-Match header) on that resource, or if "*" is given
752   and any current entity exists for that resource, then the server &MAY;
753   perform the requested method as if the If-Match header field did not
754   exist.
755</t>
756<t>
757   If none of the entity tags match, or if "*" is given and no current
758   entity exists, the server &MUST-NOT; perform the requested method, and
759   &MUST; return a 412 (Precondition Failed) response. This behavior is
760   most useful when the client wants to prevent an updating method, such
761   as PUT, from modifying a resource that has changed since the client
762   last retrieved it.
763</t>
764<t>
765   If the request would, without the If-Match header field, result in
766   anything other than a 2xx or 412 status, then the If-Match header
767   &MUST; be ignored.
768</t>
769<t>
770   The meaning of "If-Match: *" is that the method &SHOULD; be performed
771   if the representation selected by the origin server (or by a cache,
772   possibly using the Vary mechanism, see &header-vary;) exists, and
773   &MUST-NOT; be performed if the representation does not exist.
774</t>
775<t>
776   A request intended to update a resource (e.g., a PUT) &MAY; include an
777   If-Match header field to signal that the request method &MUST-NOT; be
778   applied if the entity corresponding to the If-Match value (a single
779   entity tag) is no longer a representation of that resource. This
780   allows the user to indicate that they do not wish the request to be
781   successful if the resource has been changed without their knowledge.
782   Examples:
783</t>
784<figure><artwork type="example">
785  If-Match: "xyzzy"
786  If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
787  If-Match: *
788</artwork></figure>
789<t>
790   The result of a request having both an If-Match header field and
791   either an If-None-Match or an If-Modified-Since header fields is
792   undefined by this specification.
793</t>
794</section>
795
796<section title="If-Modified-Since" anchor="header.if-modified-since">
797  <iref primary="true" item="If-Modified-Since header" x:for-anchor=""/>
798  <iref primary="true" item="Headers" subitem="If-Modified-Since" x:for-anchor=""/>
799  <x:anchor-alias value="If-Modified-Since"/>
800  <x:anchor-alias value="If-Modified-Since-v"/>
801<t>
802   The "If-Modified-Since" request-header field is used to make a request
803   method conditional: if the requested variant has not been modified since the
804   time specified in this field, the server will not return an entity; instead,
805   a 304 (Not Modified) response will be returned.
806</t>
807<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Modified-Since"/><iref primary="true" item="Grammar" subitem="If-Modified-Since-v"/>
808  <x:ref>If-Modified-Since</x:ref>   = "If-Modified-Since" ":" <x:ref>OWS</x:ref>
809                        <x:ref>If-Modified-Since-v</x:ref>
810  <x:ref>If-Modified-Since-v</x:ref> = <x:ref>HTTP-date</x:ref>
811</artwork></figure>
812<t>
813   An example of the field is:
814</t>
815<figure><artwork type="example">
816  If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
817</artwork></figure>
818<t>
819   A GET method with an If-Modified-Since header and no Range header
820   requests that the identified entity be transferred only if it has
821   been modified since the date given by the If-Modified-Since header.
822   The algorithm for determining this includes the following cases:
823  <list style="numbers">
824      <t>If the request would normally result in anything other than a
825         200 (OK) status, or if the passed If-Modified-Since date is
826         invalid, the response is exactly the same as for a normal GET.
827         A date which is later than the server's current time is
828         invalid.</t>
829
830      <t>If the variant has been modified since the If-Modified-Since
831         date, the response is exactly the same as for a normal GET.</t>
832
833      <t>If the variant has not been modified since a valid If-Modified-Since
834         date, the server &SHOULD; return a 304 (Not
835         Modified) response.</t>
836  </list>
837</t>
838<t>
839   The purpose of this feature is to allow efficient updates of cached
840   information with a minimum amount of transaction overhead.
841  <list><t>
842      <x:h>Note:</x:h> The Range request-header field modifies the meaning of If-Modified-Since;
843      see &header-range; for full details.
844    </t><t>
845      <x:h>Note:</x:h> If-Modified-Since times are interpreted by the server, whose
846      clock might not be synchronized with the client.
847    </t><t>
848      <x:h>Note:</x:h> When handling an If-Modified-Since header field, some
849      servers will use an exact date comparison function, rather than a
850      less-than function, for deciding whether to send a 304 (Not
851      Modified) response. To get best results when sending an If-Modified-Since
852      header field for cache validation, clients are
853      advised to use the exact date string received in a previous Last-Modified
854      header field whenever possible.
855    </t><t>
856      <x:h>Note:</x:h> If a client uses an arbitrary date in the If-Modified-Since
857      header instead of a date taken from the Last-Modified header for
858      the same request, the client should be aware of the fact that this
859      date is interpreted in the server's understanding of time. The
860      client should consider unsynchronized clocks and rounding problems
861      due to the different encodings of time between the client and
862      server. This includes the possibility of race conditions if the
863      document has changed between the time it was first requested and
864      the If-Modified-Since date of a subsequent request, and the
865      possibility of clock-skew-related problems if the If-Modified-Since
866      date is derived from the client's clock without correction
867      to the server's clock. Corrections for different time bases
868      between client and server are at best approximate due to network
869      latency.
870    </t>
871  </list>
872</t>
873<t>
874   The result of a request having both an If-Modified-Since header field
875   and either an If-Match or an If-Unmodified-Since header fields is
876   undefined by this specification.
877</t>
878</section>
879
880<section title="If-None-Match" anchor="header.if-none-match">
881  <iref primary="true" item="If-None-Match header" x:for-anchor=""/>
882  <iref primary="true" item="Headers" subitem="If-None-Match" x:for-anchor=""/>
883  <x:anchor-alias value="If-None-Match"/>
884  <x:anchor-alias value="If-None-Match-v"/>
885<t>
886   The "If-None-Match" request-header field is used to make a request method
887   conditional. A client that has one or more entities previously
888   obtained from the resource can verify that none of those entities is
889   current by including a list of their associated entity tags in the
890   If-None-Match header field.
891</t>
892<t>
893   This allows efficient updates of cached information with a minimum amount of
894   transaction overhead. It is also used to prevent a method (e.g. PUT)
895   from inadvertently modifying an existing resource when the client
896   believes that the resource does not exist.
897</t>
898<t>
899   As a special case, the value "*" matches any current entity of the
900   resource.
901</t>
902<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-None-Match"/><iref primary="true" item="Grammar" subitem="If-None-Match-v"/>
903  <x:ref>If-None-Match</x:ref>   = "If-None-Match" ":" <x:ref>OWS</x:ref> <x:ref>If-None-Match-v</x:ref>
904  <x:ref>If-None-Match-v</x:ref> = "*" / 1#<x:ref>entity-tag</x:ref>
905</artwork></figure>
906<t>
907   If any of the entity tags match the entity tag of the entity that
908   would have been returned in the response to a similar GET request
909   (without the If-None-Match header) on that resource, or if "*" is
910   given and any current entity exists for that resource, then the
911   server &MUST-NOT; perform the requested method, unless required to do
912   so because the resource's modification date fails to match that
913   supplied in an If-Modified-Since header field in the request.
914   Instead, if the request method was GET or HEAD, the server &SHOULD;
915   respond with a 304 (Not Modified) response, including the cache-related
916   header fields (particularly ETag) of one of the entities that
917   matched. For all other request methods, the server &MUST; respond with
918   a status of 412 (Precondition Failed).
919</t>
920<t>
921   If none of the entity tags match, then the server &MAY; perform the
922   requested method as if the If-None-Match header field did not exist,
923   but &MUST; also ignore any If-Modified-Since header field(s) in the
924   request. That is, if no entity tags match, then the server &MUST-NOT;
925   return a 304 (Not Modified) response.
926</t>
927<t>
928   If the request would, without the If-None-Match header field, result
929   in anything other than a 2xx or 304 status, then the If-None-Match
930   header &MUST; be ignored. (See <xref target="rules.for.when.to.use.entity.tags.and.last-modified.dates"/> for a discussion of
931   server behavior when both If-Modified-Since and If-None-Match appear
932   in the same request.)
933</t>
934<t>
935   The meaning of "If-None-Match: *" is that the method &MUST-NOT; be
936   performed if the representation selected by the origin server (or by
937   a cache, possibly using the Vary mechanism, see &header-vary;)
938   exists, and &SHOULD; be performed if the representation does not exist.
939   This feature is intended to be useful in preventing races between PUT
940   operations.
941</t>
942<t>
943   Examples:
944</t>
945<figure><artwork type="example">
946  If-None-Match: "xyzzy"
947  If-None-Match: W/"xyzzy"
948  If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
949  If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
950  If-None-Match: *
951</artwork></figure>
952<t>
953   The result of a request having both an If-None-Match header field and
954   either an If-Match or an If-Unmodified-Since header fields is
955   undefined by this specification.
956</t>
957</section>
958
959<section title="If-Unmodified-Since" anchor="header.if-unmodified-since">
960  <iref primary="true" item="If-Unmodified-Since header" x:for-anchor=""/>
961  <iref primary="true" item="Headers" subitem="If-Unmodified-Since" x:for-anchor=""/>
962  <x:anchor-alias value="If-Unmodified-Since"/>
963  <x:anchor-alias value="If-Unmodified-Since-v"/>
964<t>
965   The "If-Unmodified-Since" request-header field is used to make a request
966   method conditional. If the requested resource has not been modified
967   since the time specified in this field, the server &SHOULD; perform the
968   requested operation as if the If-Unmodified-Since header were not
969   present.
970</t>
971<t>
972   If the requested variant has been modified since the specified time,
973   the server &MUST-NOT; perform the requested operation, and &MUST; return
974   a 412 (Precondition Failed).
975</t>
976<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Unmodified-Since"/><iref primary="true" item="Grammar" subitem="If-Unmodified-Since-v"/>
977  <x:ref>If-Unmodified-Since</x:ref>   = "If-Unmodified-Since" ":" <x:ref>OWS</x:ref>
978                          <x:ref>If-Unmodified-Since-v</x:ref>
979  <x:ref>If-Unmodified-Since-v</x:ref> = <x:ref>HTTP-date</x:ref>
980</artwork></figure>
981<t>
982   An example of the field is:
983</t>
984<figure><artwork type="example">
985  If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
986</artwork></figure>
987<t>
988   If the request normally (i.e., without the If-Unmodified-Since
989   header) would result in anything other than a 2xx or 412 status, the
990   If-Unmodified-Since header &SHOULD; be ignored.
991</t>
992<t>
993   If the specified date is invalid, the header is ignored.
994</t>
995<t>
996   The result of a request having both an If-Unmodified-Since header
997   field and either an If-None-Match or an If-Modified-Since header
998   fields is undefined by this specification.
999</t>
1000</section>
1001
1002<section title="Last-Modified" anchor="header.last-modified">
1003  <iref primary="true" item="Last-Modified header" x:for-anchor=""/>
1004  <iref primary="true" item="Headers" subitem="Last-Modified" x:for-anchor=""/>
1005  <x:anchor-alias value="Last-Modified"/>
1006  <x:anchor-alias value="Last-Modified-v"/>
1007<t>
1008   The "Last-Modified" entity-header field indicates the date and time at
1009   which the origin server believes the variant was last modified.
1010</t>
1011<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Last-Modified"/><iref primary="true" item="Grammar" subitem="Last-Modified-v"/>
1012  <x:ref>Last-Modified</x:ref>   = "Last-Modified" ":" <x:ref>OWS</x:ref> <x:ref>Last-Modified-v</x:ref>
1013  <x:ref>Last-Modified-v</x:ref> = <x:ref>HTTP-date</x:ref>
1014</artwork></figure>
1015<t>
1016   An example of its use is
1017</t>
1018<figure><artwork type="example">
1019  Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
1020</artwork></figure>
1021<t>
1022   The exact meaning of this header field depends on the implementation
1023   of the origin server and the nature of the original resource. For
1024   files, it may be just the file system last-modified time. For
1025   entities with dynamically included parts, it may be the most recent
1026   of the set of last-modify times for its component parts. For database
1027   gateways, it may be the last-update time stamp of the record. For
1028   virtual objects, it may be the last time the internal state changed.
1029</t>
1030<t>
1031   An origin server &MUST-NOT; send a Last-Modified date which is later
1032   than the server's time of message origination. In such cases, where
1033   the resource's last modification would indicate some time in the
1034   future, the server &MUST; replace that date with the message
1035   origination date.
1036</t>
1037<t>
1038   An origin server &SHOULD; obtain the Last-Modified value of the entity
1039   as close as possible to the time that it generates the Date value of
1040   its response. This allows a recipient to make an accurate assessment
1041   of the entity's modification time, especially if the entity changes
1042   near the time that the response is generated.
1043</t>
1044<t>
1045   HTTP/1.1 servers &SHOULD; send Last-Modified whenever feasible.
1046</t>
1047<t>
1048   The Last-Modified entity-header field value is often used as a cache
1049   validator. In simple terms, a cache entry is considered to be valid
1050   if the entity has not been modified since the Last-Modified value.
1051</t>
1052</section>
1053
1054</section>
1055
1056<section title="IANA Considerations" anchor="IANA.considerations">
1057
1058<section title="Status Code Registration" anchor="status.code.registration">
1059<t>
1060   The HTTP Status Code Registry located at <eref target="http://www.iana.org/assignments/http-status-codes"/>
1061   should be updated with the registrations below:
1062</t>
1063<?BEGININC p4-conditional.iana-status-codes ?>
1064<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
1065<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
1066   <ttcol>Value</ttcol>
1067   <ttcol>Description</ttcol>
1068   <ttcol>Reference</ttcol>
1069   <c>304</c>
1070   <c>Not Modified</c>
1071   <c>
1072      <xref target="status.304"/>
1073   </c>
1074   <c>412</c>
1075   <c>Precondition Failed</c>
1076   <c>
1077      <xref target="status.412"/>
1078   </c>
1079</texttable>
1080<!--(END)-->
1081<?ENDINC p4-conditional.iana-status-codes ?>
1082</section>
1083
1084<section title="Message Header Registration" anchor="message.header.registration">
1085<t>
1086   The Message Header Registry located at <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/> should be updated
1087   with the permanent registrations below (see <xref target="RFC3864"/>):
1088</t>
1089<?BEGININC p4-conditional.iana-headers ?>
1090<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
1091<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
1092   <ttcol>Header Field Name</ttcol>
1093   <ttcol>Protocol</ttcol>
1094   <ttcol>Status</ttcol>
1095   <ttcol>Reference</ttcol>
1096
1097   <c>ETag</c>
1098   <c>http</c>
1099   <c>standard</c>
1100   <c>
1101      <xref target="header.etag"/>
1102   </c>
1103   <c>If-Match</c>
1104   <c>http</c>
1105   <c>standard</c>
1106   <c>
1107      <xref target="header.if-match"/>
1108   </c>
1109   <c>If-Modified-Since</c>
1110   <c>http</c>
1111   <c>standard</c>
1112   <c>
1113      <xref target="header.if-modified-since"/>
1114   </c>
1115   <c>If-None-Match</c>
1116   <c>http</c>
1117   <c>standard</c>
1118   <c>
1119      <xref target="header.if-none-match"/>
1120   </c>
1121   <c>If-Unmodified-Since</c>
1122   <c>http</c>
1123   <c>standard</c>
1124   <c>
1125      <xref target="header.if-unmodified-since"/>
1126   </c>
1127   <c>Last-Modified</c>
1128   <c>http</c>
1129   <c>standard</c>
1130   <c>
1131      <xref target="header.last-modified"/>
1132   </c>
1133</texttable>
1134<!--(END)-->
1135<?ENDINC p4-conditional.iana-headers ?>
1136<t>
1137   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
1138</t>
1139</section>
1140</section>
1141
1142<section title="Security Considerations" anchor="security.considerations">
1143<t>
1144   No additional security considerations have been identified beyond
1145   those applicable to HTTP in general &messaging;.
1146</t>
1147</section>
1148
1149<section title="Acknowledgments" anchor="ack">
1150</section>
1151</middle>
1152<back>
1153
1154<references title="Normative References">
1155
1156<reference anchor="Part1">
1157  <front>
1158    <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
1159    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1160      <organization abbrev="Day Software">Day Software</organization>
1161      <address><email>fielding@gbiv.com</email></address>
1162    </author>
1163    <author initials="J." surname="Gettys" fullname="Jim Gettys">
1164      <organization>One Laptop per Child</organization>
1165      <address><email>jg@laptop.org</email></address>
1166    </author>
1167    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1168      <organization abbrev="HP">Hewlett-Packard Company</organization>
1169      <address><email>JeffMogul@acm.org</email></address>
1170    </author>
1171    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1172      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1173      <address><email>henrikn@microsoft.com</email></address>
1174    </author>
1175    <author initials="L." surname="Masinter" fullname="Larry Masinter">
1176      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1177      <address><email>LMM@acm.org</email></address>
1178    </author>
1179    <author initials="P." surname="Leach" fullname="Paul J. Leach">
1180      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1181      <address><email>paulle@microsoft.com</email></address>
1182    </author>
1183    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1184      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1185      <address><email>timbl@w3.org</email></address>
1186    </author>
1187    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1188      <organization abbrev="W3C">World Wide Web Consortium</organization>
1189      <address><email>ylafon@w3.org</email></address>
1190    </author>
1191    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1192      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1193      <address><email>julian.reschke@greenbytes.de</email></address>
1194    </author>
1195    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1196  </front>
1197  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
1198  <x:source href="p1-messaging.xml" basename="p1-messaging"/>
1199</reference>
1200
1201<reference anchor="Part5">
1202  <front>
1203    <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
1204    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1205      <organization abbrev="Day Software">Day Software</organization>
1206      <address><email>fielding@gbiv.com</email></address>
1207    </author>
1208    <author initials="J." surname="Gettys" fullname="Jim Gettys">
1209      <organization>One Laptop per Child</organization>
1210      <address><email>jg@laptop.org</email></address>
1211    </author>
1212    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1213      <organization abbrev="HP">Hewlett-Packard Company</organization>
1214      <address><email>JeffMogul@acm.org</email></address>
1215    </author>
1216    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1217      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1218      <address><email>henrikn@microsoft.com</email></address>
1219    </author>
1220    <author initials="L." surname="Masinter" fullname="Larry Masinter">
1221      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1222      <address><email>LMM@acm.org</email></address>
1223    </author>
1224    <author initials="P." surname="Leach" fullname="Paul J. Leach">
1225      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1226      <address><email>paulle@microsoft.com</email></address>
1227    </author>
1228    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1229      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1230      <address><email>timbl@w3.org</email></address>
1231    </author>
1232    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1233      <organization abbrev="W3C">World Wide Web Consortium</organization>
1234      <address><email>ylafon@w3.org</email></address>
1235    </author>
1236    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1237      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1238      <address><email>julian.reschke@greenbytes.de</email></address>
1239    </author>
1240    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1241  </front>
1242  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/>
1243  <x:source href="p5-range.xml" basename="p5-range"/>
1244</reference>
1245
1246<reference anchor="Part6">
1247  <front>
1248    <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
1249    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1250      <organization abbrev="Day Software">Day Software</organization>
1251      <address><email>fielding@gbiv.com</email></address>
1252    </author>
1253    <author initials="J." surname="Gettys" fullname="Jim Gettys">
1254      <organization>One Laptop per Child</organization>
1255      <address><email>jg@laptop.org</email></address>
1256    </author>
1257    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
1258      <organization abbrev="HP">Hewlett-Packard Company</organization>
1259      <address><email>JeffMogul@acm.org</email></address>
1260    </author>
1261    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
1262      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1263      <address><email>henrikn@microsoft.com</email></address>
1264    </author>
1265    <author initials="L." surname="Masinter" fullname="Larry Masinter">
1266      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1267      <address><email>LMM@acm.org</email></address>
1268    </author>
1269    <author initials="P." surname="Leach" fullname="Paul J. Leach">
1270      <organization abbrev="Microsoft">Microsoft Corporation</organization>
1271      <address><email>paulle@microsoft.com</email></address>
1272    </author>
1273    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
1274      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1275      <address><email>timbl@w3.org</email></address>
1276    </author>
1277    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1278      <organization abbrev="W3C">World Wide Web Consortium</organization>
1279      <address><email>ylafon@w3.org</email></address>
1280    </author>
1281    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
1282      <address><email>mnot@mnot.net</email></address>
1283    </author>
1284    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1285      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1286      <address><email>julian.reschke@greenbytes.de</email></address>
1287    </author>
1288    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1289  </front>
1290  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
1291  <x:source href="p6-cache.xml" basename="p6-cache"/>
1292</reference>
1293
1294<reference anchor="RFC2119">
1295  <front>
1296    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1297    <author initials="S." surname="Bradner" fullname="Scott Bradner">
1298      <organization>Harvard University</organization>
1299      <address><email>sob@harvard.edu</email></address>
1300    </author>
1301    <date month="March" year="1997"/>
1302  </front>
1303  <seriesInfo name="BCP" value="14"/>
1304  <seriesInfo name="RFC" value="2119"/>
1305</reference>
1306
1307<reference anchor="RFC5234">
1308  <front>
1309    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
1310    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
1311      <organization>Brandenburg InternetWorking</organization>
1312      <address>
1313        <email>dcrocker@bbiw.net</email>
1314      </address> 
1315    </author>
1316    <author initials="P." surname="Overell" fullname="Paul Overell">
1317      <organization>THUS plc.</organization>
1318      <address>
1319        <email>paul.overell@thus.net</email>
1320      </address>
1321    </author>
1322    <date month="January" year="2008"/>
1323  </front>
1324  <seriesInfo name="STD" value="68"/>
1325  <seriesInfo name="RFC" value="5234"/>
1326</reference>
1327
1328</references>
1329
1330<references title="Informative References">
1331
1332<reference anchor="RFC2616">
1333  <front>
1334    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1335    <author initials="R." surname="Fielding" fullname="R. Fielding">
1336      <organization>University of California, Irvine</organization>
1337      <address><email>fielding@ics.uci.edu</email></address>
1338    </author>
1339    <author initials="J." surname="Gettys" fullname="J. Gettys">
1340      <organization>W3C</organization>
1341      <address><email>jg@w3.org</email></address>
1342    </author>
1343    <author initials="J." surname="Mogul" fullname="J. Mogul">
1344      <organization>Compaq Computer Corporation</organization>
1345      <address><email>mogul@wrl.dec.com</email></address>
1346    </author>
1347    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
1348      <organization>MIT Laboratory for Computer Science</organization>
1349      <address><email>frystyk@w3.org</email></address>
1350    </author>
1351    <author initials="L." surname="Masinter" fullname="L. Masinter">
1352      <organization>Xerox Corporation</organization>
1353      <address><email>masinter@parc.xerox.com</email></address>
1354    </author>
1355    <author initials="P." surname="Leach" fullname="P. Leach">
1356      <organization>Microsoft Corporation</organization>
1357      <address><email>paulle@microsoft.com</email></address>
1358    </author>
1359    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
1360      <organization>W3C</organization>
1361      <address><email>timbl@w3.org</email></address>
1362    </author>
1363    <date month="June" year="1999"/>
1364  </front>
1365  <seriesInfo name="RFC" value="2616"/>
1366</reference>
1367
1368<reference anchor='RFC3864'>
1369  <front>
1370    <title>Registration Procedures for Message Header Fields</title>
1371    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
1372      <organization>Nine by Nine</organization>
1373      <address><email>GK-IETF@ninebynine.org</email></address>
1374    </author>
1375    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
1376      <organization>BEA Systems</organization>
1377      <address><email>mnot@pobox.com</email></address>
1378    </author>
1379    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
1380      <organization>HP Labs</organization>
1381      <address><email>JeffMogul@acm.org</email></address>
1382    </author>
1383    <date year='2004' month='September' />
1384  </front>
1385  <seriesInfo name='BCP' value='90' />
1386  <seriesInfo name='RFC' value='3864' />
1387</reference>
1388
1389</references>
1390
1391<section title="Compatibility with Previous Versions" anchor="compatibility">
1392
1393<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
1394<t>
1395  Allow weak entity tags in all requests except range requests (Sections
1396  <xref target="weak.and.strong.validators" format="counter"/> and
1397  <xref target="header.if-none-match" format="counter"/>).
1398</t>
1399</section>
1400
1401</section>
1402
1403<?BEGININC p4-conditional.abnf-appendix ?>
1404<section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
1405<figure>
1406<artwork type="abnf" name="p4-conditional.parsed-abnf">
1407<x:ref>ETag</x:ref> = "ETag:" OWS ETag-v
1408<x:ref>ETag-v</x:ref> = entity-tag
1409
1410<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part1], Section 6.1&gt;
1411
1412<x:ref>If-Match</x:ref> = "If-Match:" OWS If-Match-v
1413<x:ref>If-Match-v</x:ref> = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
1414 entity-tag ] ) )
1415<x:ref>If-Modified-Since</x:ref> = "If-Modified-Since:" OWS If-Modified-Since-v
1416<x:ref>If-Modified-Since-v</x:ref> = HTTP-date
1417<x:ref>If-None-Match</x:ref> = "If-None-Match:" OWS If-None-Match-v
1418<x:ref>If-None-Match-v</x:ref> = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
1419 entity-tag ] ) )
1420<x:ref>If-Unmodified-Since</x:ref> = "If-Unmodified-Since:" OWS
1421 If-Unmodified-Since-v
1422<x:ref>If-Unmodified-Since-v</x:ref> = HTTP-date
1423
1424<x:ref>Last-Modified</x:ref> = "Last-Modified:" OWS Last-Modified-v
1425<x:ref>Last-Modified-v</x:ref> = HTTP-date
1426
1427<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 1.2.2&gt;
1428
1429<x:ref>entity-tag</x:ref> = [ weak ] opaque-tag
1430
1431<x:ref>opaque-tag</x:ref> = quoted-string
1432
1433<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 1.2.2&gt;
1434
1435<x:ref>weak</x:ref> = %x57.2F ; W/
1436</artwork>
1437</figure>
1438<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
1439; ETag defined but not used
1440; If-Match defined but not used
1441; If-Modified-Since defined but not used
1442; If-None-Match defined but not used
1443; If-Unmodified-Since defined but not used
1444; Last-Modified defined but not used
1445</artwork></figure></section>
1446<?ENDINC p4-conditional.abnf-appendix ?>
1447
1448<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
1449
1450<section title="Since RFC2616">
1451<t>
1452  Extracted relevant partitions from <xref target="RFC2616"/>.
1453</t>
1454</section>
1455
1456<section title="Since draft-ietf-httpbis-p4-conditional-00">
1457<t>
1458  Closed issues:
1459  <list style="symbols">
1460    <t>
1461      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/35"/>:
1462      "Normative and Informative references"
1463    </t>
1464  </list>
1465</t>
1466<t>
1467  Other changes:
1468  <list style="symbols">
1469    <t>
1470      Move definitions of 304 and 412 condition codes from Part2.
1471    </t>
1472  </list>
1473</t>
1474</section>
1475
1476<section title="Since draft-ietf-httpbis-p4-conditional-01">
1477<t>
1478  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
1479  <list style="symbols">
1480    <t>
1481      Add explicit references to BNF syntax and rules imported from other parts of the specification.
1482    </t>
1483  </list>
1484</t>
1485</section>
1486
1487<section title="Since draft-ietf-httpbis-p4-conditional-02" anchor="changes.since.02">
1488<t>
1489  Closed issues:
1490  <list style="symbols">
1491    <t>
1492      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/116"/>:
1493      "Weak ETags on non-GET requests"
1494    </t>
1495  </list>
1496</t>
1497<t>
1498  Ongoing work on IANA Message Header Registration (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/40"/>):
1499  <list style="symbols">
1500    <t>
1501      Reference RFC 3984, and update header registrations for headers defined
1502      in this document.
1503    </t>
1504  </list>
1505</t>
1506</section>
1507
1508<section title="Since draft-ietf-httpbis-p4-conditional-03" anchor="changes.since.03">
1509<t>
1510  Closed issues:
1511  <list style="symbols">
1512    <t>
1513      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/71"/>:
1514      "Examples for ETag matching"
1515    </t>
1516    <t>
1517      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/124"/>:
1518      "'entity value' undefined"
1519    </t>
1520    <t>
1521      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/126"/>:
1522      "bogus 2068 Date header reference"
1523    </t>
1524  </list>
1525</t>
1526</section>
1527
1528<section title="Since draft-ietf-httpbis-p4-conditional-04" anchor="changes.since.04">
1529<t>
1530  Ongoing work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
1531  <list style="symbols">
1532    <t>
1533      Use "/" instead of "|" for alternatives.
1534    </t>
1535    <t>
1536      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
1537      whitespace ("OWS") and required whitespace ("RWS").
1538    </t>
1539    <t>
1540      Rewrite ABNFs to spell out whitespace rules, factor out
1541      header value format definitions.
1542    </t>
1543  </list>
1544</t>
1545</section>
1546
1547<section title="Since draft-ietf-httpbis-p4-conditional-05" anchor="changes.since.05">
1548<t>
1549  Final work on ABNF conversion (<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/36"/>):
1550  <list style="symbols">
1551    <t>
1552      Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.
1553    </t>
1554  </list>
1555</t>
1556</section>
1557
1558<section title="Since draft-ietf-httpbis-p4-conditional-06" anchor="changes.since.06">
1559<t>
1560  Closed issues:
1561  <list style="symbols">
1562    <t>
1563      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/153"/>:
1564      "case-sensitivity of etag weakness indicator"
1565    </t>
1566  </list>
1567</t>
1568</section>
1569
1570<section title="Since draft-ietf-httpbis-p4-conditional-07" anchor="changes.since.07">
1571<t>
1572  Closed issues:
1573  <list style="symbols">
1574    <t>
1575      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/116"/>:
1576      "Weak ETags on non-GET requests" (If-Match still was defined to require
1577      strong matching)
1578    </t>
1579    <t>
1580      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/198"/>:
1581      "move IANA registrations for optional status codes"
1582    </t>
1583  </list>
1584</t>
1585</section>
1586
1587<section title="Since draft-ietf-httpbis-p4-conditional-08" anchor="changes.since.08">
1588<t>
1589  None yet.
1590</t>
1591</section>
1592
1593</section>
1594
1595</back>
1596</rfc>
Note: See TracBrowser for help on using the repository browser.