source: draft-ietf-httpbis/09/draft-ietf-httpbis-p4-conditional-09.xml @ 772

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

Prepare publication of -09 drafts on March 08

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