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

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

tune contact information for Julian Reschke

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 60.8 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 "June">
16  <!ENTITY ID-YEAR "2012">
17  <!ENTITY architecture               "<xref target='Part1' x:rel='#architecture' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
18  <!ENTITY notation                   "<xref target='Part1' x:rel='#notation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
19  <!ENTITY abnf-extension             "<xref target='Part1' x:rel='#abnf.extension' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
20  <!ENTITY acks                       "<xref target='Part1' x:rel='#acks' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
21  <!ENTITY whitespace                 "<xref target='Part1' x:rel='#whitespace' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
22  <!ENTITY field-components           "<xref target='Part1' x:rel='#field.components' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
23  <!ENTITY header-date                "<xref target='Part2' x:rel='#header.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
24  <!ENTITY messaging                  "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
25  <!ENTITY caching                    "<xref target='Part6' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
26  <!ENTITY header-accept-encoding     "<xref target='Part2' x:rel='#header.accept-encoding' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
27  <!ENTITY header-if-range            "<xref target='Part5' x:rel='#header.if-range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
28  <!ENTITY header-range               "<xref target='Part5' x:rel='#header.range' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
29  <!ENTITY header-vary                "<xref target='Part6' x:rel='#header.vary' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
30  <!ENTITY http-date                  "<xref target='Part2' x:rel='#http.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
31  <!ENTITY transfer-codings           "<xref target='Part1' x:rel='#transfer.codings' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
32  <!ENTITY content-negotiation        "<xref target='Part2' x:rel='#content.negotiation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
33]>
34<?rfc toc="yes" ?>
35<?rfc symrefs="yes" ?>
36<?rfc sortrefs="yes" ?>
37<?rfc compact="yes"?>
38<?rfc subcompact="no" ?>
39<?rfc linkmailto="no" ?>
40<?rfc editing="no" ?>
41<?rfc comments="yes"?>
42<?rfc inline="yes"?>
43<?rfc rfcedstyle="yes"?>
44<?rfc-ext allow-markup-in-artwork="yes" ?>
45<?rfc-ext include-references-in-index="yes" ?>
46<rfc obsoletes="2616" category="std" x:maturity-level="proposed"
47     ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"
48     xmlns:x='http://purl.org/net/xml2rfc/ext'>
49<x:link rel="prev" basename="p3-payload"/>
50<x:link rel="next" basename="p5-range"/>
51<x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>
52<front>
53
54  <title abbrev="HTTP/1.1, Part 4">HTTP/1.1, part 4: Conditional Requests</title>
55
56  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
57    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
58    <address>
59      <postal>
60        <street>345 Park Ave</street>
61        <city>San Jose</city>
62        <region>CA</region>
63        <code>95110</code>
64        <country>USA</country>
65      </postal>
66      <email>fielding@gbiv.com</email>
67      <uri>http://roy.gbiv.com/</uri>
68    </address>
69  </author>
70
71  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
72    <organization abbrev="W3C">World Wide Web Consortium</organization>
73    <address>
74      <postal>
75        <street>W3C / ERCIM</street>
76        <street>2004, rte des Lucioles</street>
77        <city>Sophia-Antipolis</city>
78        <region>AM</region>
79        <code>06902</code>
80        <country>France</country>
81      </postal>
82      <email>ylafon@w3.org</email>
83      <uri>http://www.raubacapeu.net/people/yves/</uri>
84    </address>
85  </author>
86
87  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
88    <organization abbrev="greenbytes">greenbytes GmbH</organization>
89    <address>
90      <postal>
91        <street>Hafenweg 16</street>
92        <city>Muenster</city><region>NW</region><code>48155</code>
93        <country>Germany</country>
94      </postal>
95      <email>julian.reschke@greenbytes.de</email>
96      <uri>http://greenbytes.de/tech/webdav/</uri>
97    </address>
98  </author>
99
100  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
101  <workgroup>HTTPbis Working Group</workgroup>
102
103<abstract>
104<t>
105   The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
106   distributed, collaborative, hypertext information systems. HTTP has been in
107   use by the World Wide Web global information initiative since 1990. This
108   document is Part 4 of the seven-part specification that defines the protocol
109   referred to as "HTTP/1.1" and, taken together, obsoletes RFC 2616.
110</t>
111<t>
112   Part 4 defines request header fields for indicating conditional requests and
113   the rules for constructing responses to those requests.
114</t>
115</abstract>
116
117<note title="Editorial Note (To be removed by RFC Editor)">
118  <t>
119    Discussion of this draft ought to take place on the HTTPBIS working group
120    mailing list (ietf-http-wg@w3.org), which is archived at
121    <eref target="http://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
122  </t>
123  <t>
124    The current issues list is at
125    <eref target="http://tools.ietf.org/wg/httpbis/trac/report/3"/> and related
126    documents (including fancy diffs) can be found at
127    <eref target="http://tools.ietf.org/wg/httpbis/"/>.
128  </t>
129  <t>
130    The changes in this draft are summarized in <xref target="changes.since.19"/>.
131  </t>
132</note>
133</front>
134<middle>
135<section title="Introduction" anchor="introduction">
136<t>
137   This document defines the HTTP/1.1 conditional request mechanisms,
138   including both metadata for indicating/observing changes in resource
139   representations and request header fields that specify preconditions
140   on that metadata be checked before performing the request method.
141   Conditional GET requests are the most efficient mechanism for HTTP
142   cache updates &caching;.  Conditionals can also be
143   applied to state-changing methods, such as PUT and DELETE, to prevent
144   the "lost update" problem: one client accidentally overwriting
145   the work of another client that has been acting in parallel.
146</t>
147<t>
148   Conditional request preconditions are based on the state of the target
149   resource as a whole (its current value set) or the state as observed
150   in a previously obtained representation (one value in that set).
151   A resource might have multiple current representations, each with its
152   own observable state.  The conditional request mechanisms assume that
153   the mapping of requests to corresponding representations will be
154   consistent over time if the server intends to take advantage of
155   conditionals.  Regardless, if the mapping is inconsistent and
156   the server is unable to select the appropriate representation, then
157   no harm will result when the precondition evaluates to false.
158</t>
159<t><iref primary="true" item="selected representation"/>
160   We use the term "<x:dfn>selected representation</x:dfn>" to refer to
161   the current representation of the target resource that would have been
162   selected in a successful response if the same request had used the method
163   GET and had excluded all of the conditional request header fields.
164   The conditional request preconditions are evaluated by comparing the
165   values provided in the request header fields to the current metadata
166   for the selected representation.
167</t>
168
169<section title="Conformance and Error Handling" anchor="intro.conformance.and.error.handling">
170<t>
171   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
172   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
173   document are to be interpreted as described in <xref target="RFC2119"/>.
174</t>
175<t>
176   This document defines conformance criteria for several roles in HTTP
177   communication, including Senders, Recipients, Clients, Servers, User-Agents,
178   Origin Servers, Intermediaries, Proxies and Gateways. See &architecture;
179   for definitions of these terms.
180</t>
181<t>
182   An implementation is considered conformant if it complies with all of the
183   requirements associated with its role(s). Note that SHOULD-level requirements
184   are relevant here, unless one of the documented exceptions is applicable.
185</t>
186<t>
187   This document also uses ABNF to define valid protocol elements
188   (<xref target="notation"/>). In addition to the prose requirements placed
189   upon them, Senders &MUST-NOT; generate protocol elements that are invalid.
190</t>
191<t>
192   Unless noted otherwise, Recipients &MUST; be able to parse all protocol
193   elements matching the ABNF rules defined for them and &MAY; take steps to
194   recover a usable protocol element from an invalid construct. However, HTTP does not define
195   specific error handling mechanisms, except in cases where it has direct
196   impact on security. This is because different uses of the protocol require
197   different error handling strategies; for example, a Web browser might wish to
198   transparently recover from a response where the Location header field
199   doesn't parse according to the ABNF, whereby in a systems control protocol
200   using HTTP, this type of error recovery could lead to dangerous consequences.
201</t>
202</section>
203
204<section title="Syntax Notation" anchor="notation">
205  <x:anchor-alias value="ALPHA"/>
206  <x:anchor-alias value="CR"/>
207  <x:anchor-alias value="DIGIT"/>
208  <x:anchor-alias value="DQUOTE"/>
209  <x:anchor-alias value="LF"/>
210  <x:anchor-alias value="OCTET"/>
211  <x:anchor-alias value="VCHAR"/>
212  <x:anchor-alias value="core.rules"/>
213  <x:anchor-alias value="obs-text"/>
214  <x:anchor-alias value="OWS"/>
215  <x:anchor-alias value="HTTP-date"/>
216<t>
217   This specification uses the Augmented Backus-Naur Form (ABNF) notation
218   of <xref target="RFC5234"/> with the list rule extension defined in
219   &notation;<xref target="collected.abnf"/> shows the collected ABNF
220   with the list rule expanded.
221</t>
222<t>
223  The following core rules are included by
224  reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
225  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
226  DIGIT (decimal 0-9), DQUOTE (double quote),
227  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
228  OCTET (any 8-bit sequence of data), SP (space), and
229  VCHAR (any visible US-ASCII character).
230</t>
231<t>
232  The ABNF rules below are defined in <xref target="Part1"/> and
233  <xref target="Part2"/>:
234</t>
235<figure><artwork type="abnf2616">
236  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &whitespace;&gt;
237  <x:ref>obs-text</x:ref>      = &lt;obs-text, defined in &field-components;&gt;
238  <x:ref>HTTP-date</x:ref>     = &lt;HTTP-date, defined in &http-date;&gt;
239</artwork></figure>
240</section>
241</section>
242
243<section title="Validators" anchor="validators">
244   <iref primary="true" item="metadata"/>
245   <iref primary="true" item="validator"/>
246<t>
247   This specification defines two forms of metadata that are commonly used
248   to observe resource state and test for preconditions: modification dates
249   and opaque entity tags.  Additional metadata that reflects resource state
250   has been defined by various extensions of HTTP, such as WebDAV
251   <xref target="RFC4918"/>, that are beyond the scope of this specification.
252   A resource metadata value is referred to as a "<x:dfn>validator</x:dfn>"
253   when it is used within a precondition.
254</t>
255
256<section title="Weak versus Strong" anchor="weak.and.strong.validators">
257   <iref primary="true" item="validator" subitem="weak"/>
258   <iref primary="true" item="validator" subitem="strong"/>
259<t>
260   Validators come in two flavors: strong or weak.  Weak validators are easy
261   to generate but are far less useful for comparisons.  Strong validators
262   are ideal for comparisons but can be very difficult (and occasionally
263   impossible) to generate efficiently.  Rather than impose that all forms
264   of resource adhere to the same strength of validator, HTTP exposes the
265   type of validator in use and imposes restrictions on when weak validators
266   can be used as preconditions.
267</t>
268<t>
269   A "strong validator" is a representation metadata value that &MUST; be
270   changed to a new, previously unused or guaranteed unique, value whenever
271   a change occurs to the representation data such that a change would be
272   observable in the payload body of a 200 response to GET.  A strong
273   validator &MAY; be changed for other reasons, such as when a semantically
274   significant part of the representation metadata is changed (e.g.,
275   Content-Type), but it is in the best interests of the origin server to only
276   change the value when it is necessary to invalidate the stored responses
277   held by remote caches and authoring tools.  A strong validator &MUST; be
278   unique across all representations of a given resource, such that no two
279   representations of that resource share the same validator unless
280   their payload body would be identical.
281</t>
282<t>
283   Cache entries might persist for arbitrarily long periods, regardless
284   of expiration times.  Thus, a cache might attempt to validate an
285   entry using a validator that it obtained in the distant past.
286   A strong validator &MUST; be unique across all versions of all
287   representations associated with a particular resource over time.
288   However, there is no implication of uniqueness across representations
289   of different resources (i.e., the same strong validator might be
290   in use for representations of multiple resources at the same time
291   and does not imply that those representations are equivalent).
292</t>
293<t>
294   There are a variety of strong validators used in practice.  The best are
295   based on strict revision control, wherein each change to a representation
296   always results in a unique node name and revision identifier being assigned
297   before the representation is made accessible to GET.  A cryptographic hash
298   function applied to the representation data is also sufficient if the data
299   is available prior to the response header fields being sent and the digest
300   does not need to be recalculated every time a validation request is
301   received.  However, if a resource has distinct representations that differ
302   only in their metadata, such as might occur with content negotiation over
303   media types that happen to share the same data format, then a server
304   &SHOULD; incorporate additional information in the validator to
305   distinguish those representations and avoid confusing cache behavior.
306</t>
307<t>
308   In contrast, a "weak validator" is a representation metadata value that
309   might not be changed for every change to the representation data.  This
310   weakness might be due to limitations in how the value is calculated, such
311   as clock resolution or an inability to ensure uniqueness for all possible
312   representations of the resource, or due to a desire by the resource owner
313   to group representations by some self-determined set of equivalency
314   rather than unique sequences of data.  A weak entity-tag &SHOULD; change
315   whenever the origin server considers prior representations to be
316   unacceptable as a substitute for the current representation. In other
317   words, a weak entity-tag &SHOULD; change whenever the origin server wants
318   caches to invalidate old responses.
319</t>
320<t>
321   For example, the representation of a weather report that changes in
322   content every second, based on dynamic measurements, might be grouped
323   into sets of equivalent representations (from the origin server's
324   perspective) with the same weak validator in order to allow cached
325   representations to be valid for a reasonable period of time (perhaps
326   adjusted dynamically based on server load or weather quality).
327   Likewise, a representation's modification time, if defined with only
328   one-second resolution, might be a weak validator if it is possible
329   for the representation to be modified twice during a single second and
330   retrieved between those modifications.
331</t>
332<t>
333   A "use" of a validator occurs when either a client generates a request
334   and includes the validator in a precondition or when a server
335   compares two validators.
336   Weak validators are only usable in contexts that do not depend on exact
337   equality of a representation's payload body.
338   Strong validators are usable and preferred for all conditional requests,
339   including cache validation, partial content ranges, and "lost update"
340   avoidance.
341</t>
342</section>
343
344<section title="Last-Modified" anchor="header.last-modified">
345  <iref primary="true" item="Last-Modified header field" x:for-anchor=""/>
346  <iref primary="true" item="Header Fields" subitem="Last-Modified" x:for-anchor=""/>
347  <x:anchor-alias value="Last-Modified"/>
348<t>
349   The "Last-Modified" header field indicates the date and time at
350   which the origin server believes the selected representation was
351   last modified.
352</t>
353<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Last-Modified"/>
354  <x:ref>Last-Modified</x:ref> = <x:ref>HTTP-date</x:ref>
355</artwork></figure>
356<t>
357   An example of its use is
358</t>
359<figure><artwork type="example">
360  Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
361</artwork></figure>
362
363<section title="Generation" anchor="lastmod.generation">
364<t>
365   Origin servers &SHOULD; send Last-Modified for any selected
366   representation for which a last modification date can be reasonably
367   and consistently determined, since its use in conditional requests
368   and evaluating cache freshness (&caching;) results in a substantial
369   reduction of HTTP traffic on the Internet and can be a significant
370   factor in improving service scalability and reliability.
371</t>
372<t>
373   A representation is typically the sum of many parts behind the
374   resource interface.  The last-modified time would usually be
375   the most recent time that any of those parts were changed.
376   How that value is determined for any given resource is an
377   implementation detail beyond the scope of this specification.
378   What matters to HTTP is how recipients of the Last-Modified
379   header field can use its value to make conditional requests
380   and test the validity of locally cached responses.
381</t>
382<t>
383   An origin server &SHOULD; obtain the Last-Modified value of the
384   representation as close as possible to the time that it generates
385   the Date field-value for its response. This allows a recipient to
386   make an accurate assessment of the representation's modification time,
387   especially if the representation changes near the time that the
388   response is generated.
389</t>
390<t>
391   An origin server with a clock &MUST-NOT; send a Last-Modified date
392   that is later than the server's time of message origination (Date).
393   If the last modification time is derived from implementation-specific
394   metadata that evaluates to some time in the future, according to the
395   origin server's clock, then the origin server &MUST; replace that
396   value with the message origination date. This prevents a future
397   modification date from having an adverse impact on cache validation.
398</t>
399<t>
400   An origin server without a clock &MUST-NOT; assign Last-Modified
401   values to a response unless these values were associated
402   with the resource by some other system or user with a reliable clock.
403</t>
404</section>
405
406<section title="Comparison" anchor="lastmod.comparison">
407<t>
408   A Last-Modified time, when used as a validator in a request, is
409   implicitly weak unless it is possible to deduce that it is strong,
410   using the following rules:
411  <list style="symbols">
412     <t>The validator is being compared by an origin server to the
413        actual current validator for the representation and,</t>
414     <t>That origin server reliably knows that the associated representation did
415        not change twice during the second covered by the presented
416        validator.</t>
417  </list>
418</t>
419<t>
420   or
421  <list style="symbols">
422     <t>The validator is about to be used by a client in an If-Modified-Since,
423        If-Unmodified-Since header field, because the client has a cache entry,
424        or If-Range for the associated representation, and</t>
425     <t>That cache entry includes a Date value, which gives the time
426        when the origin server sent the original response, and</t>
427     <t>The presented Last-Modified time is at least 60 seconds before
428        the Date value.</t>
429  </list>
430</t>
431<t>
432   or
433  <list style="symbols">
434     <t>The validator is being compared by an intermediate cache to the
435        validator stored in its cache entry for the representation, and</t>
436     <t>That cache entry includes a Date value, which gives the time
437        when the origin server sent the original response, and</t>
438     <t>The presented Last-Modified time is at least 60 seconds before
439        the Date value.</t>
440  </list>
441</t>
442<t>
443   This method relies on the fact that if two different responses were
444   sent by the origin server during the same second, but both had the
445   same Last-Modified time, then at least one of those responses would
446   have a Date value equal to its Last-Modified time. The arbitrary 60-second
447   limit guards against the possibility that the Date and Last-Modified
448   values are generated from different clocks, or at somewhat
449   different times during the preparation of the response. An
450   implementation &MAY; use a value larger than 60 seconds, if it is
451   believed that 60 seconds is too short.
452</t>
453</section>
454</section>
455
456<section title="ETag" anchor="header.etag">
457  <iref primary="true" item="ETag header field" x:for-anchor=""/>
458  <iref primary="true" item="Header Fields" subitem="ETag" x:for-anchor=""/>
459  <x:anchor-alias value="ETag"/>
460  <x:anchor-alias value="entity-tag"/>
461  <x:anchor-alias value="entity.tags"/>
462  <x:anchor-alias value="opaque-tag"/>
463  <x:anchor-alias value="weak"/>
464  <x:anchor-alias value="etagc"/>
465<t>
466   The ETag header field provides the current entity-tag for the
467   selected representation.
468   An entity-tag is an opaque validator for differentiating between
469   multiple representations of the same resource, regardless of whether
470   those multiple representations are due to resource state changes over
471   time, content negotiation resulting in multiple representations being
472   valid at the same time, or both. An entity-tag consists of an opaque
473   quoted string, possibly prefixed by a weakness indicator.
474</t>
475<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="ETag"/><iref primary="true" item="Grammar" subitem="entity-tag"/><iref primary="true" item="Grammar" subitem="weak"/><iref primary="true" item="Grammar" subitem="opaque-tag"/><iref primary="true" item="Grammar" subitem="etagc"/>
476  <x:ref>ETag</x:ref>       = <x:ref>entity-tag</x:ref>
477
478  <x:ref>entity-tag</x:ref> = [ <x:ref>weak</x:ref> ] <x:ref>opaque-tag</x:ref>
479  <x:ref>weak</x:ref>       = <x:abnf-char-sequence>"W/"</x:abnf-char-sequence> ; "W/", case-sensitive
480  <x:ref>opaque-tag</x:ref> = <x:ref>DQUOTE</x:ref> *<x:ref>etagc</x:ref> <x:ref>DQUOTE</x:ref>
481  <x:ref>etagc</x:ref>      = %x21 / %x23-7E / <x:ref>obs-text</x:ref>
482             ; <x:ref>VCHAR</x:ref> except double quotes, plus obs-text
483</artwork></figure>
484<x:note>
485  <t>
486    <x:h>Note:</x:h> Previously, opaque-tag was defined to be a quoted-string
487    (<xref target="RFC2616" x:fmt="," x:sec="3.11"/>), thus some recipients
488    might perform backslash unescaping. Servers therefore ought to avoid
489    backslash characters in entity tags.
490  </t>
491</x:note>
492<t>
493   An entity-tag can be more reliable for validation than a modification
494   date in situations where it is inconvenient to store modification
495   dates, where the one-second resolution of HTTP date values is not
496   sufficient, or where modification dates are not consistently maintained.
497</t>
498<figure><preamble>
499  Examples:
500</preamble>
501<artwork type="example">
502  ETag: "xyzzy"
503  ETag: W/"xyzzy"
504  ETag: ""
505</artwork></figure>
506<t>
507   An entity-tag can be either a weak or strong validator, with
508   strong being the default.  If an origin server provides an entity-tag
509   for a representation and the generation of that entity-tag does not satisfy
510   the requirements for a strong validator
511   (<xref target="weak.and.strong.validators"/>), then that
512   entity-tag &MUST; be marked as weak by prefixing its opaque value
513   with "W/" (case-sensitive).
514</t>
515
516<section title="Generation" anchor="entity.tag.generation">
517<t>
518   The principle behind entity-tags is that only the service author
519   knows the implementation of a resource well enough to select the
520   most accurate and efficient validation mechanism for that resource,
521   and that any such mechanism can be mapped to a simple sequence of
522   octets for easy comparison.  Since the value is opaque, there is no
523   need for the client to be aware of how each entity-tag is constructed.
524</t>
525<t>
526   For example, a resource that has implementation-specific versioning
527   applied to all changes might use an internal revision number, perhaps
528   combined with a variance identifier for content negotiation, to
529   accurately differentiate between representations.
530   Other implementations might use a stored hash of representation content,
531   a combination of various filesystem attributes, or a modification
532   timestamp that has sub-second resolution.
533</t>
534<t>
535   Origin servers &SHOULD; send ETag for any selected representation
536   for which detection of changes can be reasonably and consistently
537   determined, since the entity-tag's use in conditional requests and
538   evaluating cache freshness (&caching;) can result in a substantial
539   reduction of HTTP network traffic and can be a significant factor in
540   improving service scalability and reliability.
541</t>
542</section>
543
544<section title="Comparison" anchor="entity.tag.comparison">
545  <x:anchor-alias value="validator.comparison"/>
546<t>
547   There are two entity-tag comparison functions, depending
548   on whether the comparison context allows the use of weak validators
549   or not:
550  <list style="symbols">
551     <t>The strong comparison function: in order to be considered equal,
552        both opaque-tags &MUST; be identical character-by-character, and both
553        &MUST-NOT; be weak.</t>
554     <t>The weak comparison function: in order to be considered equal, both
555        opaque-tags &MUST; be identical character-by-character, but
556        either or both of them &MAY; be tagged as "weak" without affecting
557        the result.</t>
558  </list>
559</t>
560<t>
561   The example below shows the results for a set of entity-tag pairs,
562   and both the weak and strong comparison function results:
563</t>
564<texttable align="left">
565  <ttcol>ETag 1</ttcol>
566  <ttcol>ETag 2</ttcol>
567  <ttcol>Strong Comparison</ttcol>
568  <ttcol>Weak Comparison</ttcol>
569
570  <c>W/"1"</c>
571  <c>W/"1"</c>
572  <c>no match</c>
573  <c>match</c>
574 
575  <c>W/"1"</c>
576  <c>W/"2"</c>
577  <c>no match</c>
578  <c>no match</c>
579
580  <c>W/"1"</c>
581  <c>"1"</c>
582  <c>no match</c>
583  <c>match</c>
584
585  <c>"1"</c>
586  <c>"1"</c>
587  <c>match</c>
588  <c>match</c>
589</texttable>
590</section>
591
592<section title="Example: Entity-tags varying on Content-Negotiated Resources" anchor="example.entity.tag.vs.conneg">
593<t>
594   Consider a resource that is subject to content negotiation (&content-negotiation;),
595   and where the representations returned upon a GET request vary based on
596   the Accept-Encoding request header field (&header-accept-encoding;):
597</t>
598<figure><preamble>>> Request:</preamble><artwork type="message/http; msgtype=&#34;request&#34;"  x:indent-with="  ">
599GET /index HTTP/1.1
600Host: www.example.com
601Accept-Encoding: gzip
602
603</artwork></figure>
604<t>
605   In this case, the response might or might not use the gzip content coding.
606   If it does not, the response might look like:
607</t>
608<figure><preamble>>> Response:</preamble><artwork type="message/http; msgtype=&#34;response&#34;"  x:indent-with="  ">
609HTTP/1.1 200 OK
610Date: Thu, 26 Mar 2010 00:05:00 GMT
611ETag: "123-a"
612Content-Length: <x:length-of target="exbody"/>
613Vary: Accept-Encoding
614Content-Type: text/plain
615
616<x:span anchor="exbody">Hello World!
617Hello World!
618Hello World!
619Hello World!
620Hello World!
621</x:span></artwork></figure>
622<t>
623   An alternative representation that does use gzip content coding would be:
624</t>
625<figure><preamble>>> Response:</preamble><artwork type="message/http; msgtype=&#34;response&#34;"  x:indent-with="  ">
626HTTP/1.1 200 OK
627Date: Thu, 26 Mar 2010 00:05:00 GMT
628ETag: "123-b"
629Content-Length: 43
630Vary: Accept-Encoding
631Content-Type: text/plain
632Content-Encoding: gzip
633
634<spanx>...binary data...</spanx></artwork></figure>
635<x:note>
636  <t>
637    <x:h>Note:</x:h> Content codings are a property of the representation,
638    so therefore an entity-tag of an encoded representation has to be distinct
639    from an unencoded representation to prevent conflicts during cache updates
640    and range requests.  In contrast, transfer codings (&transfer-codings;)
641    apply only during message transfer and do not require distinct entity-tags.
642  </t>
643</x:note>
644</section>
645</section>
646
647<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">
648<t>
649   We adopt a set of rules and recommendations for origin servers,
650   clients, and caches regarding when various validator types ought to
651   be used, and for what purposes.
652</t>
653<t>
654   HTTP/1.1 origin servers:
655  <list style="symbols">
656     <t>&SHOULD; send an entity-tag validator unless it is not feasible to
657        generate one.</t>
658
659     <t>&MAY; send a weak entity-tag instead of a strong entity-tag, if
660        performance considerations support the use of weak entity-tags,
661        or if it is unfeasible to send a strong entity-tag.</t>
662
663     <t>&SHOULD; send a Last-Modified value if it is feasible to send one.</t>
664  </list>
665</t>
666<t>
667   In other words, the preferred behavior for an HTTP/1.1 origin server
668   is to send both a strong entity-tag and a Last-Modified value.
669</t>
670<t>
671   HTTP/1.1 clients:
672  <list style="symbols">
673     <t>&MUST; use that entity-tag in any cache-conditional request (using
674        If-Match or If-None-Match) if an entity-tag has been provided by the
675        origin server.</t>
676
677     <t>&SHOULD; use the Last-Modified value in non-subrange cache-conditional
678        requests (using If-Modified-Since) if only a Last-Modified value has
679        been provided by the origin server. </t>
680
681     <t>&MAY; use the Last-Modified value in subrange cache-conditional
682        requests (using If-Unmodified-Since) if only a Last-Modified value has
683        been provided by an HTTP/1.0 origin server. The user agent &SHOULD;
684        provide a way to disable this, in case of difficulty.</t>
685
686     <t>&SHOULD; use both validators in cache-conditional requests if both an
687        entity-tag and a Last-Modified value have been provided by the origin
688        server. This allows both HTTP/1.0 and HTTP/1.1 caches to respond
689        appropriately.</t>
690  </list>
691</t>
692<t>
693   An HTTP/1.1 origin server, upon receiving a conditional request that
694   includes both a Last-Modified date (e.g., in an If-Modified-Since or
695   If-Unmodified-Since header field) and one or more entity-tags (e.g.,
696   in an If-Match, If-None-Match, or If-Range header field) as cache
697   validators, &MUST-NOT; return a response status code of 304 (Not Modified)
698   unless doing so is consistent with all of the conditional header
699   fields in the request.
700</t>
701<t>
702   An HTTP/1.1 caching proxy, upon receiving a conditional request that
703   includes both a Last-Modified date and one or more entity-tags as
704   cache validators, &MUST-NOT; return a locally cached response to the
705   client unless that cached response is consistent with all of the
706   conditional header fields in the request.
707  <list><t>
708      <x:h>Note:</x:h> The general principle behind these rules is that HTTP/1.1
709      servers and clients ought to transmit as much non-redundant
710      information as is available in their responses and requests.
711      HTTP/1.1 systems receiving this information will make the most
712      conservative assumptions about the validators they receive.
713  </t><t>
714      HTTP/1.0 clients and caches might ignore entity-tags. Generally,
715      last-modified values received or used by these systems will
716      support transparent and efficient caching, and so HTTP/1.1 origin
717      servers should provide Last-Modified values. In those rare cases
718      where the use of a Last-Modified value as a validator by an
719      HTTP/1.0 system could result in a serious problem, then HTTP/1.1
720      origin servers should not provide one.
721  </t></list>
722</t>
723</section>
724</section>
725
726<section title="Precondition Header Fields" anchor="header.field.definitions">
727<t>
728   This section defines the syntax and semantics of HTTP/1.1 header fields
729   for applying preconditions on requests.
730</t>
731
732<section title="If-Match" anchor="header.if-match">
733  <iref primary="true" item="If-Match header field" x:for-anchor=""/>
734  <iref primary="true" item="Header Fields" subitem="If-Match" x:for-anchor=""/>
735  <x:anchor-alias value="If-Match"/>
736<t>
737   The "If-Match" header field &MAY; be used to make a request method
738   conditional on the current existence or value of an entity-tag for
739   one or more representations of the target resource.  If-Match is
740   generally useful for resource update requests, such as PUT requests,
741   as a means for protecting against accidental overwrites when multiple
742   clients are acting in parallel on the same resource (i.e., the
743   "lost update" problem).  An If-Match field-value of "*" places the
744   precondition on the existence of any current representation for the
745   target resource.
746</t>
747<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Match"/>
748  <x:ref>If-Match</x:ref> = "*" / 1#<x:ref>entity-tag</x:ref>
749</artwork></figure>
750<t>
751   If any of the entity-tags listed in the If-Match field value match
752   (as per <xref target="entity.tag.comparison"/>) the entity-tag of the
753   selected representation for the target resource,
754   or if "*" is given and any current representation exists for the
755   target resource, then the server &MAY; perform the request method
756   as if the If-Match header field was not present.
757</t>
758<t>
759   If none of the entity-tags match, or if "*" is given and no current
760   representation exists, the server &MUST-NOT; perform the requested method.
761   Instead, the server &MUST; respond with the 412 (Precondition Failed)
762   status code.
763</t>
764<t>
765   If the request would, without the If-Match header field, result in
766   anything other than a 2xx or 412 status code, then the If-Match header field
767   &MUST; be ignored.
768</t>
769<t>
770   Examples:
771</t>
772<figure><artwork type="example">
773  If-Match: "xyzzy"
774  If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
775  If-Match: *
776</artwork></figure>
777<t>
778   The result of a request having both an If-Match header field and
779   either an If-None-Match or an If-Modified-Since header field is
780   undefined by this specification.
781</t>
782</section>
783
784<section title="If-None-Match" anchor="header.if-none-match">
785  <iref primary="true" item="If-None-Match header field" x:for-anchor=""/>
786  <iref primary="true" item="Header Fields" subitem="If-None-Match" x:for-anchor=""/>
787  <x:anchor-alias value="If-None-Match"/>
788<t>
789   The "If-None-Match" header field &MAY; be used to make a request method
790   conditional on not matching any of the current entity-tag values for
791   representations of the target resource.  If-None-Match is primarily
792   used in conditional GET requests to enable efficient updates of cached
793   information with a minimum amount of transaction overhead.  A client
794   that has one or more representations previously obtained from the
795   target resource can send If-None-Match with a list of the associated
796   entity-tags in the hope of receiving a 304 response if at least one
797   of those representations matches the selected representation.
798</t>
799<t>
800   If-None-Match &MAY; also be used with a value of "*" to prevent an unsafe
801   request method (e.g., PUT) from inadvertently modifying an existing
802   representation of the target resource when the client believes that
803   the resource does not have a current representation.  This is a variation
804   on the "lost update" problem that might arise if more than one client
805   attempts to create an initial representation for the target resource.
806</t>
807<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-None-Match"/>
808  <x:ref>If-None-Match</x:ref> = "*" / 1#<x:ref>entity-tag</x:ref>
809</artwork></figure>
810<t>
811   If any of the entity-tags listed in the If-None-Match field-value match
812   (as per <xref target="entity.tag.comparison"/>) the entity-tag of the
813   selected representation, or if "*" is
814   given and any current representation exists for that resource, then the
815   server &MUST-NOT; perform the requested method.
816   Instead, if the request method was GET or HEAD, the server &SHOULD;
817   respond with a 304 (Not Modified) status code, including the cache-related
818   header fields (particularly ETag) of the selected representation that has
819   a matching entity-tag.  For all other request methods, the server &MUST;
820   respond with a 412 (Precondition Failed) status code.
821</t>
822<t>
823   If none of the entity-tags match, then the server &MAY; perform the
824   requested method as if the If-None-Match header field did not exist,
825   but &MUST; also ignore any If-Modified-Since header field(s) in the
826   request. That is, if no entity-tags match, then the server &MUST-NOT;
827   return a 304 (Not Modified) response.
828</t>
829<t>
830   If the request would, without the If-None-Match header field, result
831   in anything other than a 2xx or 304 status code, then the If-None-Match
832   header field &MUST; be ignored. (See <xref
833   target="rules.for.when.to.use.entity.tags.and.last-modified.dates"/> for
834   a discussion of server behavior when both If-Modified-Since and
835   If-None-Match appear in the same request.)
836</t>
837<t>
838   Examples:
839</t>
840<figure><artwork type="example">
841  If-None-Match: "xyzzy"
842  If-None-Match: W/"xyzzy"
843  If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
844  If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
845  If-None-Match: *
846</artwork></figure>
847<t>
848   The result of a request having both an If-None-Match header field and
849   either an If-Match or an If-Unmodified-Since header field is
850   undefined by this specification.
851</t>
852</section>
853
854<section title="If-Modified-Since" anchor="header.if-modified-since">
855  <iref primary="true" item="If-Modified-Since header field" x:for-anchor=""/>
856  <iref primary="true" item="Header Fields" subitem="If-Modified-Since" x:for-anchor=""/>
857  <x:anchor-alias value="If-Modified-Since"/>
858<t>
859   The "If-Modified-Since" header field &MAY; be used to make a request
860   method conditional by modification date: if the selected representation
861   has not been modified since the time specified in this field, then
862   do not perform the request method; instead, respond as detailed below.
863</t>
864<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Modified-Since"/>
865  <x:ref>If-Modified-Since</x:ref> = <x:ref>HTTP-date</x:ref>
866</artwork></figure>
867<t>
868   An example of the field is:
869</t>
870<figure><artwork type="example">
871  If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
872</artwork></figure>
873<t>
874   A GET method with an If-Modified-Since header field and no Range header
875   field requests that the selected representation be transferred only if
876   it has been modified since the date given by the If-Modified-Since
877   header field.
878   The algorithm for determining this includes the following cases:
879  <list style="numbers">
880      <t>If the request would normally result in anything other than a
881         200 (OK) status code, or if the passed If-Modified-Since date is
882         invalid, the response is exactly the same as for a normal GET.
883         A date which is later than the server's current time is
884         invalid.</t>
885
886      <t>If the selected representation has been modified since the
887         If-Modified-Since date, the response is exactly the same as for
888         a normal GET.</t>
889
890      <t>If the selected representation has not been modified since a valid
891         If-Modified-Since date, the server &SHOULD; return a
892         304 (Not Modified) response.</t>
893  </list>
894</t>
895<t>
896   The purpose of this feature is to allow efficient updates of cached
897   information with a minimum amount of transaction overhead.
898  <list><t>
899      <x:h>Note:</x:h> The Range header field modifies the meaning of If-Modified-Since;
900      see &header-range; for full details.
901    </t><t>
902      <x:h>Note:</x:h> If-Modified-Since times are interpreted by the server, whose
903      clock might not be synchronized with the client.
904    </t><t>
905      <x:h>Note:</x:h> When handling an If-Modified-Since header field, some
906      servers will use an exact date comparison function, rather than a
907      less-than function, for deciding whether to send a 304 (Not
908      Modified) response. To get best results when sending an If-Modified-Since
909      header field for cache validation, clients are
910      advised to use the exact date string received in a previous Last-Modified
911      header field whenever possible.
912    </t><t>
913      <x:h>Note:</x:h> If a client uses an arbitrary date in the If-Modified-Since
914      header field instead of a date taken from the Last-Modified header field for
915      the same request, the client needs to be aware that this
916      date is interpreted in the server's understanding of time.
917      Unsynchronized clocks and rounding problems, due to the different
918      encodings of time between the client and server, are concerns.
919      This includes the possibility of race conditions if the
920      document has changed between the time it was first requested and
921      the If-Modified-Since date of a subsequent request, and the
922      possibility of clock-skew-related problems if the If-Modified-Since
923      date is derived from the client's clock without correction
924      to the server's clock. Corrections for different time bases
925      between client and server are at best approximate due to network
926      latency.
927    </t>
928  </list>
929</t>
930<t>
931   The result of a request having both an If-Modified-Since header field
932   and either an If-Match or an If-Unmodified-Since header field is
933   undefined by this specification.
934</t>
935</section>
936
937<section title="If-Unmodified-Since" anchor="header.if-unmodified-since">
938  <iref primary="true" item="If-Unmodified-Since header field" x:for-anchor=""/>
939  <iref primary="true" item="Header Fields" subitem="If-Unmodified-Since" x:for-anchor=""/>
940  <x:anchor-alias value="If-Unmodified-Since"/>
941<t>
942   The "If-Unmodified-Since" header field &MAY; be used to make a request
943   method conditional by modification date: if the selected representation
944   has been modified since the time specified in this field, then the
945   server &MUST-NOT; perform the requested operation and &MUST; instead
946   respond with the 412 (Precondition Failed) status code.
947   If the selected representation has not been modified since the time
948   specified in this field, the server &SHOULD; perform the request
949   method as if the If-Unmodified-Since header field were not present.
950</t>
951<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="If-Unmodified-Since"/>
952  <x:ref>If-Unmodified-Since</x:ref> = <x:ref>HTTP-date</x:ref>
953</artwork></figure>
954<t>
955   An example of the field is:
956</t>
957<figure><artwork type="example">
958  If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
959</artwork></figure>
960<t>
961   If the request normally (i.e., without the If-Unmodified-Since
962   header field) would result in anything other than a 2xx or 412 status code,
963   the If-Unmodified-Since header field &SHOULD; be ignored.
964</t>
965<t>
966   If the specified date is invalid, the header field &MUST; be ignored.
967</t>
968<t>
969   The result of a request having both an If-Unmodified-Since header
970   field and either an If-None-Match or an If-Modified-Since header
971   field is undefined by this specification.
972</t>
973</section>
974
975<section title="If-Range" anchor="header.if-range">
976<t>
977   The If-Range header field provides a special conditional request
978   mechanism that is similar to If-Match and If-Unmodified-Since but
979   specific to HTTP range requests. If-Range is defined in &header-if-range;.
980</t>
981</section>
982
983</section>
984
985<section title="Status Code Definitions" anchor="status.code.definitions">
986<section title="304 Not Modified" anchor="status.304">
987  <iref primary="true" item="304 Not Modified (status code)" x:for-anchor=""/>
988  <iref primary="true" item="Status Codes" subitem="304 Not Modified" x:for-anchor=""/>
989<t>
990   The 304 status code indicates that a conditional GET request has been
991   received and would have resulted in a 200 (OK) response if it were not
992   for the fact that the condition has evaluated to false.  In other words,
993   there is no need for the server to transfer a representation of the
994   target resource because the client's request indicates that it already
995   has a valid representation, as indicated by the 304 response header
996   fields, and is therefore redirecting the client to make use of that
997   stored representation as if it were the payload of a 200 response.
998   The 304 response &MUST-NOT; contain a message-body, and thus is always
999   terminated by the first empty line after the header fields.
1000</t>
1001<t>
1002   A 304 response &MUST; include a Date header field (&header-date;)
1003   unless the origin server does not have a clock that can provide a
1004   reasonable approximation of the current time.  If a 200 response
1005   to the same request would have included any of the header fields
1006   Cache-Control, Content-Location, ETag, Expires, or Vary, then
1007   those same header fields &MUST; be sent in a 304 response.
1008</t>
1009<t>
1010   Since the goal of a 304 response is to minimize information transfer
1011   when the recipient already has one or more cached representations,
1012   the response &SHOULD-NOT; include representation metadata other
1013   than the above listed fields unless said metadata exists for the
1014   purpose of guiding cache updates (e.g., future HTTP extensions).
1015</t>
1016<t>
1017   If the recipient of a 304 response does not have a cached representation
1018   corresponding to the entity-tag indicated by the 304 response, then the
1019   recipient &MUST-NOT; use the 304 to update its own cache.  If this
1020   conditional request originated with an outbound client, such as a
1021   user agent with its own cache sending a conditional GET to a shared
1022   proxy, then the 304 response &MAY; be forwarded to the outbound client.
1023   Otherwise, the recipient &MUST; disregard the 304 response and repeat
1024   the request without any preconditions.
1025</t>
1026<t>
1027   If a cache uses a received 304 response to update a cache entry, the
1028   cache &MUST; update the entry to reflect any new field values given in
1029   the response.
1030</t>
1031</section>
1032
1033<section title="412 Precondition Failed" anchor="status.412">
1034  <iref primary="true" item="412 Precondition Failed (status code)" x:for-anchor=""/>
1035  <iref primary="true" item="Status Codes" subitem="412 Precondition Failed" x:for-anchor=""/>
1036<t>
1037   The 412 status code indicates that one or more preconditions given in
1038   the request header fields evaluated to false when tested on the server.
1039   This response code allows the client to place preconditions on the
1040   current resource state (its current representations and metadata)
1041   and thus prevent the request method from being applied if the target
1042   resource is in an unexpected state.
1043</t>
1044</section>
1045</section>
1046
1047<section title="IANA Considerations" anchor="IANA.considerations">
1048
1049<section title="Status Code Registration" anchor="status.code.registration">
1050<t>
1051   The HTTP Status Code Registry located at <eref target="http://www.iana.org/assignments/http-status-codes"/>
1052   shall be updated with the registrations below:
1053</t>
1054<?BEGININC p4-conditional.iana-status-codes ?>
1055<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
1056<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
1057   <ttcol>Value</ttcol>
1058   <ttcol>Description</ttcol>
1059   <ttcol>Reference</ttcol>
1060   <c>304</c>
1061   <c>Not Modified</c>
1062   <c>
1063      <xref target="status.304"/>
1064   </c>
1065   <c>412</c>
1066   <c>Precondition Failed</c>
1067   <c>
1068      <xref target="status.412"/>
1069   </c>
1070</texttable>
1071<!--(END)-->
1072<?ENDINC p4-conditional.iana-status-codes ?>
1073</section>
1074
1075<section title="Header Field Registration" anchor="header.field.registration">
1076<t>
1077   The Message Header Field Registry located at <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/> shall be updated
1078   with the permanent registrations below (see <xref target="RFC3864"/>):
1079</t>
1080<?BEGININC p4-conditional.iana-headers ?>
1081<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
1082<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
1083   <ttcol>Header Field Name</ttcol>
1084   <ttcol>Protocol</ttcol>
1085   <ttcol>Status</ttcol>
1086   <ttcol>Reference</ttcol>
1087
1088   <c>ETag</c>
1089   <c>http</c>
1090   <c>standard</c>
1091   <c>
1092      <xref target="header.etag"/>
1093   </c>
1094   <c>If-Match</c>
1095   <c>http</c>
1096   <c>standard</c>
1097   <c>
1098      <xref target="header.if-match"/>
1099   </c>
1100   <c>If-Modified-Since</c>
1101   <c>http</c>
1102   <c>standard</c>
1103   <c>
1104      <xref target="header.if-modified-since"/>
1105   </c>
1106   <c>If-None-Match</c>
1107   <c>http</c>
1108   <c>standard</c>
1109   <c>
1110      <xref target="header.if-none-match"/>
1111   </c>
1112   <c>If-Unmodified-Since</c>
1113   <c>http</c>
1114   <c>standard</c>
1115   <c>
1116      <xref target="header.if-unmodified-since"/>
1117   </c>
1118   <c>Last-Modified</c>
1119   <c>http</c>
1120   <c>standard</c>
1121   <c>
1122      <xref target="header.last-modified"/>
1123   </c>
1124</texttable>
1125<!--(END)-->
1126<?ENDINC p4-conditional.iana-headers ?>
1127<t>
1128   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
1129</t>
1130</section>
1131</section>
1132
1133<section title="Security Considerations" anchor="security.considerations">
1134<t>
1135   No additional security considerations have been identified beyond
1136   those applicable to HTTP in general &messaging;.
1137</t>
1138</section>
1139
1140<section title="Acknowledgments" anchor="acks">
1141<t>
1142  See &acks;.
1143</t>
1144</section>
1145</middle>
1146<back>
1147
1148<references title="Normative References">
1149
1150<reference anchor="Part1">
1151  <front>
1152    <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
1153    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1154      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1155      <address><email>fielding@gbiv.com</email></address>
1156    </author>
1157    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1158      <organization abbrev="W3C">World Wide Web Consortium</organization>
1159      <address><email>ylafon@w3.org</email></address>
1160    </author>
1161    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1162      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1163      <address><email>julian.reschke@greenbytes.de</email></address>
1164    </author>
1165    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1166  </front>
1167  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
1168  <x:source href="p1-messaging.xml" basename="p1-messaging"/>
1169</reference>
1170
1171<reference anchor="Part2">
1172  <front>
1173    <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
1174    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1175      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1176      <address><email>fielding@gbiv.com</email></address>
1177    </author>
1178    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1179      <organization abbrev="W3C">World Wide Web Consortium</organization>
1180      <address><email>ylafon@w3.org</email></address>
1181    </author>
1182    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1183      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1184      <address><email>julian.reschke@greenbytes.de</email></address>
1185    </author>
1186    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1187  </front>
1188  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
1189  <x:source href="p2-semantics.xml" basename="p2-semantics"/>
1190</reference>
1191
1192<reference anchor="Part5">
1193  <front>
1194    <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
1195    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1196      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1197      <address><email>fielding@gbiv.com</email></address>
1198    </author>
1199    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1200      <organization abbrev="W3C">World Wide Web Consortium</organization>
1201      <address><email>ylafon@w3.org</email></address>
1202    </author>
1203    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1204      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1205      <address><email>julian.reschke@greenbytes.de</email></address>
1206    </author>
1207    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1208  </front>
1209  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/>
1210  <x:source href="p5-range.xml" basename="p5-range"/>
1211</reference>
1212
1213<reference anchor="Part6">
1214  <front>
1215    <title abbrev="HTTP/1.1">HTTP/1.1, part 6: Caching</title>
1216    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
1217      <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
1218      <address><email>fielding@gbiv.com</email></address>
1219    </author>
1220    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
1221      <organization abbrev="W3C">World Wide Web Consortium</organization>
1222      <address><email>ylafon@w3.org</email></address>
1223    </author>
1224    <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
1225      <organization>Rackspace</organization>
1226      <address><email>mnot@mnot.net</email></address>
1227    </author>
1228    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
1229      <organization abbrev="greenbytes">greenbytes GmbH</organization>
1230      <address><email>julian.reschke@greenbytes.de</email></address>
1231    </author>
1232    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
1233  </front>
1234  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-&ID-VERSION;"/>
1235  <x:source href="p6-cache.xml" basename="p6-cache"/>
1236</reference>
1237
1238<reference anchor="RFC2119">
1239  <front>
1240    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1241    <author initials="S." surname="Bradner" fullname="Scott Bradner">
1242      <organization>Harvard University</organization>
1243      <address><email>sob@harvard.edu</email></address>
1244    </author>
1245    <date month="March" year="1997"/>
1246  </front>
1247  <seriesInfo name="BCP" value="14"/>
1248  <seriesInfo name="RFC" value="2119"/>
1249</reference>
1250
1251<reference anchor="RFC5234">
1252  <front>
1253    <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
1254    <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
1255      <organization>Brandenburg InternetWorking</organization>
1256      <address>
1257        <email>dcrocker@bbiw.net</email>
1258      </address> 
1259    </author>
1260    <author initials="P." surname="Overell" fullname="Paul Overell">
1261      <organization>THUS plc.</organization>
1262      <address>
1263        <email>paul.overell@thus.net</email>
1264      </address>
1265    </author>
1266    <date month="January" year="2008"/>
1267  </front>
1268  <seriesInfo name="STD" value="68"/>
1269  <seriesInfo name="RFC" value="5234"/>
1270</reference>
1271
1272</references>
1273
1274<references title="Informative References">
1275
1276<reference anchor="RFC2616">
1277  <front>
1278    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1279    <author initials="R." surname="Fielding" fullname="R. Fielding">
1280      <organization>University of California, Irvine</organization>
1281      <address><email>fielding@ics.uci.edu</email></address>
1282    </author>
1283    <author initials="J." surname="Gettys" fullname="J. Gettys">
1284      <organization>W3C</organization>
1285      <address><email>jg@w3.org</email></address>
1286    </author>
1287    <author initials="J." surname="Mogul" fullname="J. Mogul">
1288      <organization>Compaq Computer Corporation</organization>
1289      <address><email>mogul@wrl.dec.com</email></address>
1290    </author>
1291    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
1292      <organization>MIT Laboratory for Computer Science</organization>
1293      <address><email>frystyk@w3.org</email></address>
1294    </author>
1295    <author initials="L." surname="Masinter" fullname="L. Masinter">
1296      <organization>Xerox Corporation</organization>
1297      <address><email>masinter@parc.xerox.com</email></address>
1298    </author>
1299    <author initials="P." surname="Leach" fullname="P. Leach">
1300      <organization>Microsoft Corporation</organization>
1301      <address><email>paulle@microsoft.com</email></address>
1302    </author>
1303    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
1304      <organization>W3C</organization>
1305      <address><email>timbl@w3.org</email></address>
1306    </author>
1307    <date month="June" year="1999"/>
1308  </front>
1309  <seriesInfo name="RFC" value="2616"/>
1310</reference>
1311
1312<reference anchor='RFC3864'>
1313  <front>
1314    <title>Registration Procedures for Message Header Fields</title>
1315    <author initials='G.' surname='Klyne' fullname='G. Klyne'>
1316      <organization>Nine by Nine</organization>
1317      <address><email>GK-IETF@ninebynine.org</email></address>
1318    </author>
1319    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'>
1320      <organization>BEA Systems</organization>
1321      <address><email>mnot@pobox.com</email></address>
1322    </author>
1323    <author initials='J.' surname='Mogul' fullname='J. Mogul'>
1324      <organization>HP Labs</organization>
1325      <address><email>JeffMogul@acm.org</email></address>
1326    </author>
1327    <date year='2004' month='September' />
1328  </front>
1329  <seriesInfo name='BCP' value='90' />
1330  <seriesInfo name='RFC' value='3864' />
1331</reference>
1332
1333<reference anchor='RFC4918'>
1334  <front>
1335    <title>HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</title>
1336    <author initials="L.M." surname="Dusseault" fullname="Lisa Dusseault" role="editor" >
1337      <organization abbrev="CommerceNet">CommerceNet</organization>
1338      <address><email>ldusseault@commerce.net</email></address>
1339    </author>
1340    <date month="June" year="2007" />
1341  </front>
1342  <seriesInfo name='RFC' value='4918' />
1343</reference>
1344</references>
1345
1346<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
1347<t>
1348  Allow weak entity-tags in all requests except range requests (Sections
1349  <xref target="weak.and.strong.validators" format="counter"/> and
1350  <xref target="header.if-none-match" format="counter"/>).
1351</t>
1352<t>
1353  Change ETag header field ABNF not to use quoted-string, thus avoiding
1354  escaping issues.
1355  (<xref target="header.etag"/>)
1356</t>
1357<t>
1358  Change ABNF productions for header fields to only define the field value.
1359  (<xref target="header.field.definitions"/>)
1360</t>
1361</section>
1362
1363<?BEGININC p4-conditional.abnf-appendix ?>
1364<section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
1365<figure>
1366<artwork type="abnf" name="p4-conditional.parsed-abnf">
1367<x:ref>ETag</x:ref> = entity-tag
1368
1369<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part2], Section 5.1&gt;
1370
1371<x:ref>If-Match</x:ref> = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
1372 entity-tag ] ) )
1373<x:ref>If-Modified-Since</x:ref> = HTTP-date
1374<x:ref>If-None-Match</x:ref> = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
1375 entity-tag ] ) )
1376<x:ref>If-Unmodified-Since</x:ref> = HTTP-date
1377
1378<x:ref>Last-Modified</x:ref> = HTTP-date
1379
1380<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 3.2.1&gt;
1381
1382<x:ref>entity-tag</x:ref> = [ weak ] opaque-tag
1383<x:ref>etagc</x:ref> = "!" / %x23-7E ; '#'-'~'
1384 / obs-text
1385
1386<x:ref>obs-text</x:ref> = &lt;obs-text, defined in [Part1], Section 3.2.4&gt;
1387<x:ref>opaque-tag</x:ref> = DQUOTE *etagc DQUOTE
1388
1389<x:ref>weak</x:ref> = %x57.2F ; W/
1390</artwork>
1391</figure>
1392<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
1393; ETag defined but not used
1394; If-Match defined but not used
1395; If-Modified-Since defined but not used
1396; If-None-Match defined but not used
1397; If-Unmodified-Since defined but not used
1398; Last-Modified defined but not used
1399</artwork></figure></section>
1400<?ENDINC p4-conditional.abnf-appendix ?>
1401
1402<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
1403<t>
1404  Changes up to the first Working Group Last Call draft are summarized
1405  in <eref target="http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-19#appendix-C"/>.
1406</t>
1407
1408<section title="Since draft-ietf-httpbis-p4-conditional-19" anchor="changes.since.19">
1409<t>
1410  Closed issues:
1411  <list style="symbols"> 
1412    <t>
1413      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/361"/>:
1414      "ABNF requirements for recipients"
1415    </t>
1416  </list>
1417</t>
1418</section>
1419
1420</section>
1421
1422</back>
1423</rfc>
Note: See TracBrowser for help on using the repository browser.