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

Last change on this file since 1916 was 1916, checked in by mnot@…, 10 years ago

Remove Yves from editors' list on p1/p2/p3/p4/p6/p7.

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