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

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

latest versions of rfc2629.xslt and xml2rfc.tcl, bump up document dates

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