source: draft-ietf-httpbis/20/draft-ietf-httpbis-p4-conditional-20.xml

Last change on this file was 1807, checked in by julian.reschke@…, 8 years ago

Prepare release of -20 drafts

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