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

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

Replace "may" by "might" (see #362)

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