One document matched: draft-ietf-httpbis-p4-conditional-23.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
This XML document is the output of clean-for-DTD.xslt; a tool that strips
extensions to RFC2629(bis) from documents for processing with xml2rfc.
-->
<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no" ?>
<?rfc linkmailto="no" ?>
<?rfc editing="no" ?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc rfcedstyle="yes"?>
<!DOCTYPE rfc
PUBLIC "" "rfc2629.dtd">
<rfc obsoletes="2616" category="std" ipr="pre5378Trust200902" docName="draft-ietf-httpbis-p4-conditional-23">
<front>
<title abbrev="HTTP/1.1 Conditional Requests">Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
<author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
<organization abbrev="Adobe">Adobe Systems Incorporated</organization>
<address>
<postal>
<street>345 Park Ave</street>
<city>San Jose</city>
<region>CA</region>
<code>95110</code>
<country>USA</country>
</postal>
<email>fielding@gbiv.com</email>
<uri>http://roy.gbiv.com/</uri>
</address>
</author>
<author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
<organization abbrev="greenbytes">greenbytes GmbH</organization>
<address>
<postal>
<street>Hafenweg 16</street>
<city>Muenster</city><region>NW</region><code>48155</code>
<country>Germany</country>
</postal>
<email>julian.reschke@greenbytes.de</email>
<uri>http://greenbytes.de/tech/webdav/</uri>
</address>
</author>
<date month="July" year="2013" day="15"/>
<workgroup>HTTPbis Working Group</workgroup>
<abstract>
<t>
The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
distributed, collaborative, hypertext information systems. This document
defines HTTP/1.1 conditional requests, including metadata header fields
for indicating state changes, request header fields for making
preconditions on such state, and rules for constructing the responses to a
conditional request when one or more preconditions evaluate to false.
</t>
</abstract>
<note title="Editorial Note (To be removed by RFC Editor)">
<t>
Discussion of this draft takes place on the HTTPBIS working group
mailing list (ietf-http-wg@w3.org), which is archived at
<eref target="http://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
</t>
<t>
The current issues list is at
<eref target="http://tools.ietf.org/wg/httpbis/trac/report/3"/> and related
documents (including fancy diffs) can be found at
<eref target="http://tools.ietf.org/wg/httpbis/"/>.
</t>
<t>
The changes in this draft are summarized in <xref target="changes.since.22"/>.
</t>
</note>
</front>
<middle>
<section title="Introduction" anchor="introduction">
<t>
Conditional requests are HTTP requests <xref target="Part2"/> that include
one or more header fields indicating a precondition to be tested before
applying the method semantics to the target resource.
This document defines the HTTP/1.1 conditional request mechanisms in terms
of the architecture, syntax notation, and conformance criteria defined in
<xref target="Part1"/>.
</t>
<t>
Conditional GET requests are the most efficient mechanism for HTTP
cache updates <xref target="Part6"/>. Conditionals can also be
applied to state-changing methods, such as PUT and DELETE, to prevent
the "lost update" problem: one client accidentally overwriting
the work of another client that has been acting in parallel.
</t>
<t><iref primary="true" item="selected representation"/>
Conditional request preconditions are based on the state of the target
resource as a whole (its current value set) or the state as observed
in a previously obtained representation (one value in that set).
A resource might have multiple current representations, each with its
own observable state. The conditional request mechanisms assume that
the mapping of requests to a "selected representation" (Section 3 of <xref target="Part2"/>)
will be consistent over time if the server intends to take advantage of
conditionals. Regardless, if the mapping is inconsistent and the server is
unable to select the appropriate representation, then no harm will result
when the precondition evaluates to false.
</t>
<t>
The conditional request preconditions defined by this specification are
evaluated by comparing the validators provided in the conditional request
header fields to the current validators for the selected representation
in the order defined by <xref target="precedence"/>.
</t>
<section title="Conformance and Error Handling" anchor="conformance">
<t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <xref target="RFC2119"/>.
</t>
<t>
Conformance criteria and considerations regarding error handling
are defined in Section 2.5 of <xref target="Part1"/>.
</t>
</section>
<section title="Syntax Notation" anchor="notation">
<t>
This specification uses the Augmented Backus-Naur Form (ABNF) notation
of <xref target="RFC5234"/> with the list rule extension defined in
Section 1.2 of <xref target="Part1"/>. <xref target="imported.abnf"/> describes rules imported from
other documents. <xref target="collected.abnf"/> shows the collected ABNF
with the list rule expanded.
</t>
</section>
</section>
<section title="Validators" anchor="validators">
<iref primary="true" item="metadata"/>
<iref primary="true" item="validator"/>
<t>
This specification defines two forms of metadata that are commonly used
to observe resource state and test for preconditions: modification dates
(<xref target="header.last-modified"/>) and opaque entity tags
(<xref target="header.etag"/>). Additional metadata that reflects resource state
has been defined by various extensions of HTTP, such as WebDAV
<xref target="RFC4918"/>, that are beyond the scope of this specification.
A resource metadata value is referred to as a "validator"
when it is used within a precondition.
</t>
<section title="Weak versus Strong" anchor="weak.and.strong.validators">
<iref primary="true" item="validator" subitem="weak"/>
<iref primary="true" item="validator" subitem="strong"/>
<t>
Validators come in two flavors: strong or weak. Weak validators are easy
to generate but are far less useful for comparisons. Strong validators
are ideal for comparisons but can be very difficult (and occasionally
impossible) to generate efficiently. Rather than impose that all forms
of resource adhere to the same strength of validator, HTTP exposes the
type of validator in use and imposes restrictions on when weak validators
can be used as preconditions.
</t>
<t>
A "strong validator" is representation metadata that changes value whenever
a change occurs to the representation data that would be observable in the
payload body of a 200 (OK) response to GET.
</t>
<t>
A strong validator might change for other reasons, such as when a
semantically significant part of the representation metadata is changed
(e.g., Content-Type), but it is in the best interests of the
origin server to only change the value when it is necessary to invalidate
the stored responses held by remote caches and authoring tools. A strong
validator is unique across all representations of a given resource, such
that no two representations of that resource can share the same validator
unless their representation data is identical.
</t>
<t>
Cache entries might persist for arbitrarily long periods, regardless
of expiration times. Thus, a cache might attempt to validate an
entry using a validator that it obtained in the distant past.
A strong validator is unique across all versions of all
representations associated with a particular resource over time.
However, there is no implication of uniqueness across representations
of different resources (i.e., the same strong validator might be
in use for representations of multiple resources at the same time
and does not imply that those representations are equivalent).
</t>
<t>
There are a variety of strong validators used in practice. The best are
based on strict revision control, wherein each change to a representation
always results in a unique node name and revision identifier being assigned
before the representation is made accessible to GET. A collision-resistant hash
function applied to the representation data is also sufficient if the data
is available prior to the response header fields being sent and the digest
does not need to be recalculated every time a validation request is
received. However, if a resource has distinct representations that differ
only in their metadata, such as might occur with content negotiation over
media types that happen to share the same data format, then the origin
server SHOULD incorporate additional information in the validator to
distinguish those representations.
</t>
<t>
In contrast, a "weak validator" is representation metadata that
might not change for every change to the representation data. This
weakness might be due to limitations in how the value is calculated, such
as clock resolution or an inability to ensure uniqueness for all possible
representations of the resource, or due to a desire by the resource owner
to group representations by some self-determined set of equivalency
rather than unique sequences of data. An origin server SHOULD change a
weak entity-tag whenever it considers prior representations to be
unacceptable as a substitute for the current representation. In other words,
a weak entity-tag ought to change whenever the origin server wants caches to
invalidate old responses.
</t>
<t>
For example, the representation of a weather report that changes in
content every second, based on dynamic measurements, might be grouped
into sets of equivalent representations (from the origin server's
perspective) with the same weak validator in order to allow cached
representations to be valid for a reasonable period of time (perhaps
adjusted dynamically based on server load or weather quality).
Likewise, a representation's modification time, if defined with only
one-second resolution, might be a weak validator if it is possible
for the representation to be modified twice during a single second and
retrieved between those modifications.
</t>
<t>
Likewise, a validator is weak if it is shared by two or more
representations of a given resource at the same time, unless those
representations have identical representation data. For example, if the
origin server sends the same validator for a representation with a gzip
content coding applied as it does for a representation with no content
coding, then that validator is weak. However, two simultaneous
representations might share the same strong validator if they differ only
in the representation metadata, such as when two different media types are
available for the same representation data.
</t>
<t>
A "use" of a validator occurs when either a client generates a request
and includes the validator in a precondition or when a server
compares two validators.
Weak validators are only usable in contexts that do not depend on exact
equality of the representation data.
Strong validators are usable and preferred for all conditional requests,
including cache validation, partial content ranges, and "lost update"
avoidance.
</t>
</section>
<section title="Last-Modified" anchor="header.last-modified">
<iref primary="true" item="Last-Modified header field"/>
<t>
The "Last-Modified" header field in a response provides a timestamp
indicating the date and time at which the origin server believes the
selected representation was last modified, as determined at the conclusion
of handling the request.
</t>
<figure><iref primary="true" item="Grammar" subitem="Last-Modified"/><artwork type="abnf2616"><![CDATA[
Last-Modified = HTTP-date
]]></artwork></figure>
<t>
An example of its use is
</t>
<figure><artwork type="example"><![CDATA[
Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
]]></artwork></figure>
<section title="Generation" anchor="lastmod.generation">
<t>
Origin servers SHOULD send Last-Modified for any selected
representation for which a last modification date can be reasonably
and consistently determined, since its use in conditional requests
and evaluating cache freshness (<xref target="Part6"/>) results in a substantial
reduction of HTTP traffic on the Internet and can be a significant
factor in improving service scalability and reliability.
</t>
<t>
A representation is typically the sum of many parts behind the
resource interface. The last-modified time would usually be
the most recent time that any of those parts were changed.
How that value is determined for any given resource is an
implementation detail beyond the scope of this specification.
What matters to HTTP is how recipients of the Last-Modified
header field can use its value to make conditional requests
and test the validity of locally cached responses.
</t>
<t>
An origin server SHOULD obtain the Last-Modified value of the
representation as close as possible to the time that it generates the
Date field value for its response. This allows a recipient to
make an accurate assessment of the representation's modification time,
especially if the representation changes near the time that the
response is generated.
</t>
<t>
An origin server with a clock MUST NOT send a Last-Modified date
that is later than the server's time of message origination (Date).
If the last modification time is derived from implementation-specific
metadata that evaluates to some time in the future, according to the
origin server's clock, then the origin server MUST replace that
value with the message origination date. This prevents a future
modification date from having an adverse impact on cache validation.
</t>
<t>
An origin server without a clock MUST NOT assign Last-Modified
values to a response unless these values were associated
with the resource by some other system or user with a reliable clock.
</t>
</section>
<section title="Comparison" anchor="lastmod.comparison">
<t>
A Last-Modified time, when used as a validator in a request, is
implicitly weak unless it is possible to deduce that it is strong,
using the following rules:
<list style="symbols">
<t>The validator is being compared by an origin server to the
actual current validator for the representation and,</t>
<t>That origin server reliably knows that the associated representation did
not change twice during the second covered by the presented
validator.</t>
</list>
</t>
<t>
or
<list style="symbols">
<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>,
<xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref> header field, because the client has
a cache entry, or If-Range for the associated
representation, and</t>
<t>That cache entry includes a Date value, which gives the
time when the origin server sent the original response, and</t>
<t>The presented Last-Modified time is at least 60 seconds before
the Date value.</t>
</list>
</t>
<t>
or
<list style="symbols">
<t>The validator is being compared by an intermediate cache to the
validator stored in its cache entry for the representation, and</t>
<t>That cache entry includes a Date value, which gives the
time when the origin server sent the original response, and</t>
<t>The presented Last-Modified time is at least 60 seconds before
the Date value.</t>
</list>
</t>
<t>
This method relies on the fact that if two different responses were
sent by the origin server during the same second, but both had the
same Last-Modified time, then at least one of those responses would
have a Date value equal to its Last-Modified time. The
arbitrary 60-second limit guards against the possibility that the Date and
Last-Modified values are generated from different clocks, or at somewhat
different times during the preparation of the response. An
implementation MAY use a value larger than 60 seconds, if it is
believed that 60 seconds is too short.
</t>
</section>
</section>
<section title="ETag" anchor="header.etag">
<iref primary="true" item="ETag header field"/>
<t>
The "ETag" header field in a response provides the current entity-tag for
the selected representation, as determined at the conclusion of handling
the request.
An entity-tag is an opaque validator for differentiating between
multiple representations of the same resource, regardless of whether
those multiple representations are due to resource state changes over
time, content negotiation resulting in multiple representations being
valid at the same time, or both. An entity-tag consists of an opaque
quoted string, possibly prefixed by a weakness indicator.
</t>
<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[
ETag = entity-tag
entity-tag = [ weak ] opaque-tag
weak = %x57.2F ; "W/", case-sensitive
opaque-tag = DQUOTE *etagc DQUOTE
etagc = %x21 / %x23-7E / obs-text
; VCHAR except double quotes, plus obs-text
]]></artwork></figure>
<t><list>
<t>
Note: Previously, opaque-tag was defined to be a quoted-string
(<xref target="RFC2616"/>, Section 3.11), thus some recipients
might perform backslash unescaping. Servers therefore ought to avoid
backslash characters in entity tags.
</t>
</list></t>
<t>
An entity-tag can be more reliable for validation than a modification
date in situations where it is inconvenient to store modification
dates, where the one-second resolution of HTTP date values is not
sufficient, or where modification dates are not consistently maintained.
</t>
<figure><preamble>
Examples:
</preamble>
<artwork type="example"><![CDATA[
ETag: "xyzzy"
ETag: W/"xyzzy"
ETag: ""
]]></artwork></figure>
<t>
An entity-tag can be either a weak or strong validator, with
strong being the default. If an origin server provides an entity-tag
for a representation and the generation of that entity-tag does not satisfy
all of the characteristics of a strong validator
(<xref target="weak.and.strong.validators"/>), then the origin server
MUST mark the entity-tag as weak by prefixing its opaque value
with "W/" (case-sensitive).
</t>
<section title="Generation" anchor="entity.tag.generation">
<t>
The principle behind entity-tags is that only the service author
knows the implementation of a resource well enough to select the
most accurate and efficient validation mechanism for that resource,
and that any such mechanism can be mapped to a simple sequence of
octets for easy comparison. Since the value is opaque, there is no
need for the client to be aware of how each entity-tag is constructed.
</t>
<t>
For example, a resource that has implementation-specific versioning
applied to all changes might use an internal revision number, perhaps
combined with a variance identifier for content negotiation, to
accurately differentiate between representations.
Other implementations might use a collision-resistant hash of
representation content,
a combination of various filesystem attributes, or a modification
timestamp that has sub-second resolution.
</t>
<t>
Origin servers SHOULD send ETag for any selected representation
for which detection of changes can be reasonably and consistently
determined, since the entity-tag's use in conditional requests and
evaluating cache freshness (<xref target="Part6"/>) can result in a substantial
reduction of HTTP network traffic and can be a significant factor in
improving service scalability and reliability.
</t>
</section>
<section title="Comparison" anchor="entity.tag.comparison">
<t>
There are two entity-tag comparison functions, depending
on whether the comparison context allows the use of weak validators
or not:
<list style="symbols">
<t>Strong comparison: two entity-tags are equivalent if both
are not weak and their opaque-tags match character-by-character.</t>
<t>Weak comparison: two entity-tags are equivalent if their opaque-tags
match character-by-character, regardless of either or both
being tagged as "weak".</t>
</list>
</t>
<t>
The example below shows the results for a set of entity-tag pairs,
and both the weak and strong comparison function results:
</t>
<texttable align="left">
<ttcol>ETag 1</ttcol>
<ttcol>ETag 2</ttcol>
<ttcol>Strong Comparison</ttcol>
<ttcol>Weak Comparison</ttcol>
<c>W/"1"</c>
<c>W/"1"</c>
<c>no match</c>
<c>match</c>
<c>W/"1"</c>
<c>W/"2"</c>
<c>no match</c>
<c>no match</c>
<c>W/"1"</c>
<c>"1"</c>
<c>no match</c>
<c>match</c>
<c>"1"</c>
<c>"1"</c>
<c>match</c>
<c>match</c>
</texttable>
</section>
<section title="Example: Entity-tags Varying on Content-Negotiated Resources" anchor="example.entity.tag.vs.conneg">
<t>
Consider a resource that is subject to content negotiation
(Section 3.4 of <xref target="Part2"/>), and where the representations sent in response to
a GET request vary based on the Accept-Encoding request
header field (Section 5.3.4 of <xref target="Part2"/>):
</t>
<figure><preamble>>> Request:</preamble><artwork type="message/http; msgtype="request""><![CDATA[
GET /index HTTP/1.1
Host: www.example.com
Accept-Encoding: gzip
]]></artwork></figure>
<t>
In this case, the response might or might not use the gzip content coding.
If it does not, the response might look like:
</t>
<figure><preamble>>> Response:</preamble><artwork type="message/http; msgtype="response""><![CDATA[
HTTP/1.1 200 OK
Date: Fri, 26 Mar 2010 00:05:00 GMT
ETag: "123-a"
Content-Length: 70
Vary: Accept-Encoding
Content-Type: text/plain
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
]]></artwork></figure>
<t>
An alternative representation that does use gzip content coding would be:
</t>
<figure><preamble>>> Response:</preamble><artwork type="message/http; msgtype="response""><![CDATA[
HTTP/1.1 200 OK
Date: Fri, 26 Mar 2010 00:05:00 GMT
ETag: "123-b"
Content-Length: 43
Vary: Accept-Encoding
Content-Type: text/plain
Content-Encoding: gzip
...binary data...]]></artwork></figure>
<t><list>
<t>
Note: Content codings are a property of the representation,
so therefore an entity-tag of an encoded representation has to be distinct
from an unencoded representation to prevent conflicts during cache updates
and range requests. In contrast, transfer codings (Section 4 of <xref target="Part1"/>)
apply only during message transfer and do not require distinct entity-tags.
</t>
</list></t>
</section>
</section>
<section title="When to Use Entity-tags and Last-Modified Dates" anchor="when.to.use.entity.tags.and.last-modified.dates">
<t>
We adopt a set of rules and recommendations for origin servers,
clients, and caches regarding when various validator types ought to
be used, and for what purposes.
</t>
<t>
In 200 (OK) responses to GET or HEAD, an origin server:
<list style="symbols">
<t>SHOULD send an entity-tag validator unless it is not feasible to
generate one.</t>
<t>MAY send a weak entity-tag instead of a strong entity-tag, if
performance considerations support the use of weak entity-tags,
or if it is unfeasible to send a strong entity-tag.</t>
<t>SHOULD send a <xref target="header.last-modified" format="none">Last-Modified</xref> value if it is feasible to
send one.</t>
</list>
</t>
<t>
In other words, the preferred behavior for an origin server
is to send both a strong entity-tag and a <xref target="header.last-modified" format="none">Last-Modified</xref>
value in successful responses to a retrieval request.
</t>
<t>
A client:
<list style="symbols">
<t>MUST use that entity-tag in any cache-conditional request (using
<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
entity-tag has been provided by the origin server.</t>
<t>SHOULD use the <xref target="header.last-modified" format="none">Last-Modified</xref> value in non-subrange
cache-conditional requests (using <xref target="header.if-modified-since" format="none">If-Modified-Since</xref>)
if only a Last-Modified value has been provided by the origin server.</t>
<t>MAY use the <xref target="header.last-modified" format="none">Last-Modified</xref> value in subrange
cache-conditional requests (using <xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref>)
if only a Last-Modified value has been provided by an HTTP/1.0 origin
server. The user agent SHOULD provide a way to disable this, in case
of difficulty.</t>
<t>SHOULD use both validators in cache-conditional requests if both an
entity-tag and a <xref target="header.last-modified" format="none">Last-Modified</xref> value have been provided
by the origin server. This allows both HTTP/1.0 and HTTP/1.1 caches to
respond appropriately.</t>
</list>
</t>
</section>
</section>
<section title="Precondition Header Fields" anchor="header.field.definitions">
<t>
This section defines the syntax and semantics of HTTP/1.1 header fields
for applying preconditions on requests.
<xref target="precedence"/> defines when the preconditions are applied and
the order of evaluation when more than one precondition is present.
</t>
<section title="If-Match" anchor="header.if-match">
<iref primary="true" item="If-Match header field"/>
<t>
The "If-Match" header field can be used to make a request method conditional
on the current existence or value of an entity-tag for one or more
representations of the target resource.
</t>
<t>
If-Match is generally useful for resource update requests, such as PUT
requests, as a means for protecting against accidental overwrites when
multiple clients are acting in parallel on the same resource (i.e., the
"lost update" problem). An If-Match field-value of "*" places the
precondition on the existence of any current representation for the
target resource.
</t>
<figure><iref primary="true" item="Grammar" subitem="If-Match"/><artwork type="abnf2616"><![CDATA[
If-Match = "*" / 1#entity-tag
]]></artwork></figure>
<t>
The If-Match condition is met if and only if any of the entity-tags listed
in the If-Match field value match the entity-tag of the selected
representation using the weak comparison function (as per <xref target="entity.tag.comparison"/>), or if "*" is given and any current
representation exists for the target resource.
</t>
<t>
If the condition is met, the server MAY perform the request method.
</t>
<t>
Origin servers MUST NOT perform the requested method if the condition is
not met; instead they MUST respond with the <xref target="status.412" format="none">412 (Precondition
Failed)</xref> status code.
</t>
<t>
Proxy servers using a cached response as the selected representation
MUST NOT perform the requested method if the condition is not met;
instead, they MUST forward the request towards the origin server.
</t>
<t>
Examples:
</t>
<figure><artwork type="example"><![CDATA[
If-Match: "xyzzy"
If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
If-Match: *
]]></artwork></figure>
</section>
<section title="If-None-Match" anchor="header.if-none-match">
<iref primary="true" item="If-None-Match header field"/>
<t>
The "If-None-Match" header field can be used to make a request method
conditional on not matching any of the current entity-tag values for
representations of the target resource.
</t>
<t>
If-None-Match is primarily used in conditional GET requests to enable
efficient updates of cached information with a minimum amount of transaction
overhead. A client that has one or more representations previously obtained
from the target resource can send If-None-Match with a list of the
associated entity-tags in the hope of receiving a <xref target="status.304" format="none">304 (Not
Modified)</xref> response if at least one of those representations matches
the selected representation.
</t>
<t>
If-None-Match can also be used with a value of "*" to prevent an unsafe
request method (e.g., PUT) from inadvertently modifying an existing
representation of the target resource when the client believes that
the resource does not have a current representation (Section 4.2.1 of <xref target="Part2"/>).
This is a variation on the "lost update" problem that might arise if more
than one client attempts to create an initial representation for the target
resource.
</t>
<figure><iref primary="true" item="Grammar" subitem="If-None-Match"/><artwork type="abnf2616"><![CDATA[
If-None-Match = "*" / 1#entity-tag
]]></artwork></figure>
<t>
The If-None-Match condition is met if and only if none of the entity-tags
listed in the If-None-Match field value match the entity-tag of the selected
representation using the weak comparison function (as per <xref target="entity.tag.comparison"/>), or if "*" is given and no current
representation exists for that resource.
</t>
<t>
If the condition is not met, the server MUST NOT perform the requested
method. Instead, if the request method was GET or HEAD, the server SHOULD
respond with a <xref target="status.304" format="none">304 (Not Modified)</xref> status code, including the
cache-related header fields (particularly <xref target="header.etag" format="none">ETag</xref>) of the
selected representation that has a matching entity-tag. For all other
request methods, the server MUST respond with a <xref target="status.412" format="none">412 (Precondition
Failed)</xref> status code when the condition is not met.
</t>
<t>
If the condition is met, the server MAY perform the requested method and
MUST ignore any <xref target="header.if-modified-since" format="none">If-Modified-Since</xref> header field(s) in the
request. That is, if no entity-tags match, then the server MUST NOT send
a <xref target="status.304" format="none">304 (Not Modified)</xref> response.
</t>
<t>
Examples:
</t>
<figure><artwork type="example"><![CDATA[
If-None-Match: "xyzzy"
If-None-Match: W/"xyzzy"
If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
If-None-Match: *
]]></artwork></figure>
</section>
<section title="If-Modified-Since" anchor="header.if-modified-since">
<iref primary="true" item="If-Modified-Since header field"/>
<t>
The "If-Modified-Since" header field can be used with GET or HEAD to make
the method conditional by modification date: if the selected representation
has not been modified since the time specified in this field, then
do not perform the request method; instead, respond as detailed below.
</t>
<figure><iref primary="true" item="Grammar" subitem="If-Modified-Since"/><artwork type="abnf2616"><![CDATA[
If-Modified-Since = HTTP-date
]]></artwork></figure>
<t>
An example of the field is:
</t>
<figure><artwork type="example"><![CDATA[
If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
]]></artwork></figure>
<t>
A GET method with an If-Modified-Since header field and no Range
header field requests that the selected representation be transferred only if
it has been modified since the date given by the If-Modified-Since
header field.
The algorithm for determining this includes the following cases:
<list style="numbers">
<t>If the request would normally result in anything other than a
200 (OK) status code, or if the passed If-Modified-Since date is
invalid, the response is exactly the same as for a normal GET.
A date that is later than the server's current time is
invalid.</t>
<t>If the selected representation has been modified since the
If-Modified-Since date, the response is exactly the same as for
a normal GET.</t>
<t>If the selected representation has not been modified since a valid
If-Modified-Since date, the server SHOULD send a
<xref target="status.304" format="none">304 (Not Modified)</xref> response.</t>
</list>
</t>
<t>
The two purposes of this feature are to allow efficient updates of cached
information, with a minimum amount of transaction overhead, and to limit
the scope of a web traversal to resources that have recently changed.
</t>
<t>
When used for cache updates, a cache will typically use the value of the
cached message's <xref target="header.last-modified" format="none">Last-Modified</xref> field to generate the field
value of If-Modified-Since. This behavior is most interoperable for cases
where clocks are poorly synchronized or when the server has chosen to only
honor exact timestamp matches (due to a problem with Last-Modified dates
that appear to go "back in time" when the origin server's clock is
corrected or a representation is restored from an archived backup).
However, caches occasionally generate the field value based on other data,
such as the Date header field of the cached message or the
local clock time that the message was received, particularly when the
cached message does not contain a <xref target="header.last-modified" format="none">Last-Modified</xref> field.
</t>
<t>
When used for limiting the scope of retrieval to a recent time window, a
user agent will generate an If-Modified-Since field value based on either
its own local clock or a Date header field received from the
server during a past run. Origin servers that choose an exact timestamp
match based on the selected representation's <xref target="header.last-modified" format="none">Last-Modified</xref>
field will not be able to help the user agent limit its data transfers to
only those changed during the specified window.
</t>
<t><list>
<t>
Note: If a client uses an arbitrary date in the If-Modified-Since
header field instead of a date taken from a <xref target="header.last-modified" format="none">Last-Modified</xref>
or Date header field from the origin server, the client
ought to be aware that its date will be interpreted according to the
server's understanding of time.
</t>
</list></t>
</section>
<section title="If-Unmodified-Since" anchor="header.if-unmodified-since">
<iref primary="true" item="If-Unmodified-Since header field"/>
<t>
The "If-Unmodified-Since" header field can be used to make a request
method conditional by modification date: if the selected representation
has been modified since the time specified in this field, then the
server MUST NOT perform the requested operation and MUST instead
respond with the <xref target="status.412" format="none">412 (Precondition Failed)</xref> status code.
If the selected representation has not been modified since the time
specified in this field, the server MAY perform the request.
</t>
<figure><iref primary="true" item="Grammar" subitem="If-Unmodified-Since"/><artwork type="abnf2616"><![CDATA[
If-Unmodified-Since = HTTP-date
]]></artwork></figure>
<t>
An example of the field is:
</t>
<figure><artwork type="example"><![CDATA[
If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
]]></artwork></figure>
<t>
A server MUST ignore the If-Unmodified-Since header field if the
received value is not a valid HTTP-date.
</t>
</section>
<section title="If-Range" anchor="header.if-range">
<t>
The "If-Range" header field provides a special conditional request
mechanism that is similar to <xref target="header.if-match" format="none">If-Match</xref> and
<xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref> but specific to range requests.
If-Range is defined in Section 3.2 of <xref target="Part5"/>.
</t>
</section>
</section>
<section title="Status Code Definitions" anchor="status.code.definitions">
<section title="304 Not Modified" anchor="status.304">
<iref primary="true" item="304 Not Modified (status code)"/>
<t>
The 304 (Not Modified) status code indicates that a
conditional GET or HEAD request has been
received and would have resulted in a 200 (OK) response
if it were not for the fact that the condition has evaluated to false.
In other words, there is no need for the server to transfer a
representation of the target resource because the request indicates that
the client, which made the request conditional, already has a valid
representation; the server is therefore redirecting the client to make
use of that stored representation as if it were the payload of a
200 (OK) response.
</t>
<t>
The server generating a 304 response MUST generate any of the following
header fields that would have been sent in a 200 (OK)
response to the same request:
Cache-Control,
Content-Location,
<xref target="header.etag" format="none">ETag</xref>,
Expires, and
Vary.
</t>
<t>
Since the goal of a 304 response is to minimize information transfer
when the recipient already has one or more cached representations,
a sender SHOULD NOT generate representation metadata other
than the above listed fields unless said metadata exists for the
purpose of guiding cache updates (e.g., <xref target="header.last-modified" format="none">Last-Modified</xref> might
be useful if the response does not have an <xref target="header.etag" format="none">ETag</xref> field).
</t>
<t>
Requirements on a cache that receives a 304 response are defined in
Section 4.2.1 of <xref target="Part6"/>. If the conditional request originated with an
outbound client, such as a user agent with its own cache sending a
conditional GET to a shared proxy, then the proxy SHOULD forward the
304 response to that client.
</t>
<t>
A 304 response cannot contain a message-body; it is always
terminated by the first empty line after the header fields.
</t>
</section>
<section title="412 Precondition Failed" anchor="status.412">
<iref primary="true" item="412 Precondition Failed (status code)"/>
<t>
The 412 (Precondition Failed) status code indicates that one
or more preconditions given in the request header fields evaluated to false
when tested on the server. This response code allows the client to place
preconditions on the current resource state (its current representations
and metadata) and thus prevent the request method from being applied if the
target resource is in an unexpected state.
</t>
</section>
</section>
<section title="Evaluation and Precedence" anchor="precedence">
<t>
For each conditional request, a server MUST evaluate the request
preconditions after it has successfully performed its normal request checks
(i.e., just before it would perform the action associated with the request
method). Preconditions are ignored if the server determines that an error
or redirect response applies before they are evaluated. Otherwise, the
evaluation depends on both the method semantics and the choice of
conditional.
</t>
<t>
A conditional request header field that is designed specifically for cache
validation, which includes <xref target="header.if-none-match" format="none">If-None-Match</xref> and
<xref target="header.if-modified-since" format="none">If-Modified-Since</xref> when used in a GET or HEAD request,
allows cached representations to be refreshed without repeatedly
transferring data already held by the client. Evaluating to false is thus
an indication that the client can continue to use its local copy of the
selected representation, as indicated by the server generating a
<xref target="status.304" format="none">304 (Not Modified)</xref> response that includes only those header
fields useful for refreshing the cached representation.
</t>
<t>
All other conditionals are intended to signal failure when the
precondition evaluates to false. For example, an <xref target="header.if-match" format="none">If-Match</xref>
conditional sent with a state-changing method (e.g., POST, PUT, DELETE) is
intended to prevent the request from taking effect on the target resource
if the resource state does not match the expected state. In other words,
evaluating the condition to false means that the resource has been changed
by some other client, perhaps by another user attempting to edit the same
resource, and thus preventing the request from being applied saves the
client from overwriting some other client's work. This result is indicated
by the server generating a <xref target="status.412" format="none">412 (Precondition Failed)</xref>
response.
</t>
<t>
The conditional request header fields defined by this specification are
ignored for request methods that never involve the selection or
modification of a selected representation (e.g., CONNECT,
OPTIONS, and TRACE). Other conditional request header fields, defined by
extensions to HTTP, might place conditions on the state of the target
resource in general, or on a group of resources. For instance, the If header
field in WebDAV can make a request conditional on various aspects (such
as locks) of multiple resources
(<xref target="RFC4918"/>, Section 10.4).
</t>
<t>
When more than one conditional request header field is present in a request,
the order in which the fields are evaluated becomes important. In practice,
the fields defined in this document are consistently implemented in a
single, logical order, due to the fact that entity tags are presumed to be
more accurate than date validators. For example, the only reason to send
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 support intermediary caches that might not have
implemented <xref target="header.if-none-match" format="none">If-None-Match</xref>, so it makes sense to ignore the
<xref target="header.if-modified-since" format="none">If-Modified-Since</xref> when entity tags are understood and
available for the selected representation.
</t>
<t>
The general rule of conditional precedence is that exact match conditions
are evaluated before cache-validating conditions and, within that order,
last-modified conditions are only evaluated if the corresponding
entity tag condition is not present (or not applicable because the
selected representation does not have an entity tag).
</t>
<t>
Specifically, the fields defined by this specification are evaluated
as follows:
<list style="numbers">
<t anchor="precedence1">When <xref target="header.if-match" format="none">If-Match</xref> is present, evaluate it:
<list style="symbols">
<t>if true, continue to step <xref target="precedence3" format="counter"/></t>
<t>if false, respond <xref target="status.412" format="none">412 (Precondition Failed)</xref></t>
</list>
</t>
<t anchor="precedence2">When <xref target="header.if-match" format="none">If-Match</xref> is not present and
<xref target="header.if-unmodified-since" format="none">If-Unmodified-Since</xref> is present, evaluate it:
<list style="symbols">
<t>if true, continue to step <xref target="precedence3" format="counter"/></t>
<t>if false, respond <xref target="status.412" format="none">412 (Precondition Failed)</xref></t>
</list>
</t>
<t anchor="precedence3">When <xref target="header.if-none-match" format="none">If-None-Match</xref> is present, evaluate it:
<list style="symbols">
<t>if true, continue to step <xref target="precedence5" format="counter"/></t>
<t>if false for GET/HEAD, respond <xref target="status.304" format="none">304 (Not Modified)</xref></t>
<t>if false for other methods, respond <xref target="status.412" format="none">412 (Precondition Failed)</xref></t>
</list>
</t>
<t anchor="precedence4">When the method is GET or HEAD,
<xref target="header.if-none-match" format="none">If-None-Match</xref> is not present, and
<xref target="header.if-modified-since" format="none">If-Modified-Since</xref> is present, evaluate it:
<list style="symbols">
<t>if true, continue to step <xref target="precedence5" format="counter"/></t>
<t>if false, respond <xref target="status.304" format="none">304 (Not Modified)</xref></t>
</list>
</t>
<t anchor="precedence5">When the method is GET and both Range and
If-Range are present, evaluate If-Range:
<list style="symbols">
<t>if the validator matches and the Range specification is
applicable to the selected representation, respond
206 (Partial Content) <xref target="Part5"/></t>
</list>
</t>
<t anchor="precedencelast">Otherwise,
<list style="symbols">
<t>all conditions are met, so perform the requested action and
respond according to its success or failure.</t>
</list>
</t>
</list>
</t>
<t>
Any extension to HTTP/1.1 that defines additional conditional request
header fields ought to define its own expectations regarding the order
for evaluating such fields in relation to those defined in this document
and other conditionals that might be found in practice.
</t>
</section>
<section title="IANA Considerations" anchor="IANA.considerations">
<section title="Status Code Registration" anchor="status.code.registration">
<t>
The HTTP Status Code Registry located at <eref target="http://www.iana.org/assignments/http-status-codes"/>
shall be updated with the registrations below:
</t>
<!--AUTOGENERATED FROM extract-status-code-defs.xslt, do not edit manually-->
<texttable align="left" suppress-title="true" anchor="iana.status.code.registration.table">
<ttcol>Value</ttcol>
<ttcol>Description</ttcol>
<ttcol>Reference</ttcol>
<c>304</c>
<c>Not Modified</c>
<c>
<xref target="status.304"/>
</c>
<c>412</c>
<c>Precondition Failed</c>
<c>
<xref target="status.412"/>
</c>
</texttable>
<!--(END)-->
</section>
<section title="Header Field Registration" anchor="header.field.registration">
<t>
HTTP header fields are registered within the Message Header Field Registry
maintained at
<eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/>.
</t>
<t>
This document defines the following HTTP header fields, so their
associated registry entries shall be updated according to the permanent
registrations below (see <xref target="BCP90"/>):
</t>
<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
<ttcol>Header Field Name</ttcol>
<ttcol>Protocol</ttcol>
<ttcol>Status</ttcol>
<ttcol>Reference</ttcol>
<c>ETag</c>
<c>http</c>
<c>standard</c>
<c>
<xref target="header.etag"/>
</c>
<c>If-Match</c>
<c>http</c>
<c>standard</c>
<c>
<xref target="header.if-match"/>
</c>
<c>If-Modified-Since</c>
<c>http</c>
<c>standard</c>
<c>
<xref target="header.if-modified-since"/>
</c>
<c>If-None-Match</c>
<c>http</c>
<c>standard</c>
<c>
<xref target="header.if-none-match"/>
</c>
<c>If-Unmodified-Since</c>
<c>http</c>
<c>standard</c>
<c>
<xref target="header.if-unmodified-since"/>
</c>
<c>Last-Modified</c>
<c>http</c>
<c>standard</c>
<c>
<xref target="header.last-modified"/>
</c>
</texttable>
<!--(END)-->
<t>
The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task Force".
</t>
</section>
</section>
<section title="Security Considerations" anchor="security.considerations">
<t>
This section is meant to inform developers, information providers, and
users of known security concerns specific to the HTTP/1.1 conditional
request mechanisms. More general security considerations are addressed
in HTTP messaging <xref target="Part1"/> and semantics <xref target="Part2"/>.
</t>
<t>
The validators defined by this specification are not intended to ensure
the validity of a representation, guard against malicious changes, or
detect man-in-the-middle attacks. At best, they enable more efficient cache
updates and optimistic concurrent writes when all participants are behaving
nicely. At worst, the conditions will fail and the client will receive a
response that is no more harmful than an HTTP exchange without conditional
requests.
</t>
<t>
An entity-tag can be abused in ways that create privacy risks. For example,
a site might deliberately construct a semantically invalid entity-tag that
is unique to the user or user agent, send it in a cacheable response with a
long freshness time, and then read that entity-tag in later conditional
requests as a means of re-identifying that user or user agent. Such an
identifying tag would become a persistent identifier for as long as the
user agent retained the original cache entry. User agents that cache
representations ought to ensure that the cache is cleared or replaced
whenever the user performs privacy-maintaining actions, such as clearing
stored cookies or changing to a private browsing mode.
</t>
</section>
<section title="Acknowledgments" anchor="acks">
<t>
See Section 9 of <xref target="Part1"/>.
</t>
</section>
</middle>
<back>
<references title="Normative References">
<reference anchor="Part1">
<front>
<title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
<author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
<organization abbrev="Adobe">Adobe Systems Incorporated</organization>
<address><email>fielding@gbiv.com</email></address>
</author>
<author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
<organization abbrev="greenbytes">greenbytes GmbH</organization>
<address><email>julian.reschke@greenbytes.de</email></address>
</author>
<date month="July" year="2013"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-23"/>
</reference>
<reference anchor="Part2">
<front>
<title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
<author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
<organization abbrev="Adobe">Adobe Systems Incorporated</organization>
<address><email>fielding@gbiv.com</email></address>
</author>
<author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
<organization abbrev="greenbytes">greenbytes GmbH</organization>
<address><email>julian.reschke@greenbytes.de</email></address>
</author>
<date month="July" year="2013"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-23"/>
</reference>
<reference anchor="Part5">
<front>
<title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
<author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
<organization abbrev="Adobe">Adobe Systems Incorporated</organization>
<address><email>fielding@gbiv.com</email></address>
</author>
<author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
<organization abbrev="W3C">World Wide Web Consortium</organization>
<address><email>ylafon@w3.org</email></address>
</author>
<author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
<organization abbrev="greenbytes">greenbytes GmbH</organization>
<address><email>julian.reschke@greenbytes.de</email></address>
</author>
<date month="July" year="2013"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-23"/>
</reference>
<reference anchor="Part6">
<front>
<title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
<author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
<organization abbrev="Adobe">Adobe Systems Incorporated</organization>
<address><email>fielding@gbiv.com</email></address>
</author>
<author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor">
<organization>Akamai</organization>
<address><email>mnot@mnot.net</email></address>
</author>
<author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
<organization abbrev="greenbytes">greenbytes GmbH</organization>
<address><email>julian.reschke@greenbytes.de</email></address>
</author>
<date month="July" year="2013"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p6-cache-23"/>
</reference>
<reference anchor="RFC2119">
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials="S." surname="Bradner" fullname="Scott Bradner">
<organization>Harvard University</organization>
<address><email>sob@harvard.edu</email></address>
</author>
<date month="March" year="1997"/>
</front>
<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="2119"/>
</reference>
<reference anchor="RFC5234">
<front>
<title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
<author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
<organization>Brandenburg InternetWorking</organization>
<address>
<email>dcrocker@bbiw.net</email>
</address>
</author>
<author initials="P." surname="Overell" fullname="Paul Overell">
<organization>THUS plc.</organization>
<address>
<email>paul.overell@thus.net</email>
</address>
</author>
<date month="January" year="2008"/>
</front>
<seriesInfo name="STD" value="68"/>
<seriesInfo name="RFC" value="5234"/>
</reference>
</references>
<references title="Informative References">
<reference anchor="RFC2616">
<front>
<title>Hypertext Transfer Protocol -- HTTP/1.1</title>
<author initials="R." surname="Fielding" fullname="R. Fielding">
<organization>University of California, Irvine</organization>
<address><email>fielding@ics.uci.edu</email></address>
</author>
<author initials="J." surname="Gettys" fullname="J. Gettys">
<organization>W3C</organization>
<address><email>jg@w3.org</email></address>
</author>
<author initials="J." surname="Mogul" fullname="J. Mogul">
<organization>Compaq Computer Corporation</organization>
<address><email>mogul@wrl.dec.com</email></address>
</author>
<author initials="H." surname="Frystyk" fullname="H. Frystyk">
<organization>MIT Laboratory for Computer Science</organization>
<address><email>frystyk@w3.org</email></address>
</author>
<author initials="L." surname="Masinter" fullname="L. Masinter">
<organization>Xerox Corporation</organization>
<address><email>masinter@parc.xerox.com</email></address>
</author>
<author initials="P." surname="Leach" fullname="P. Leach">
<organization>Microsoft Corporation</organization>
<address><email>paulle@microsoft.com</email></address>
</author>
<author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
<organization>W3C</organization>
<address><email>timbl@w3.org</email></address>
</author>
<date month="June" year="1999"/>
</front>
<seriesInfo name="RFC" value="2616"/>
</reference>
<reference anchor="BCP90">
<front>
<title>Registration Procedures for Message Header Fields</title>
<author initials="G." surname="Klyne" fullname="G. Klyne">
<organization>Nine by Nine</organization>
<address><email>GK-IETF@ninebynine.org</email></address>
</author>
<author initials="M." surname="Nottingham" fullname="M. Nottingham">
<organization>BEA Systems</organization>
<address><email>mnot@pobox.com</email></address>
</author>
<author initials="J." surname="Mogul" fullname="J. Mogul">
<organization>HP Labs</organization>
<address><email>JeffMogul@acm.org</email></address>
</author>
<date year="2004" month="September"/>
</front>
<seriesInfo name="BCP" value="90"/>
<seriesInfo name="RFC" value="3864"/>
</reference>
<reference anchor="RFC4918">
<front>
<title>HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</title>
<author initials="L.M." surname="Dusseault" fullname="Lisa Dusseault" role="editor">
<organization abbrev="CommerceNet">CommerceNet</organization>
<address><email>ldusseault@commerce.net</email></address>
</author>
<date month="June" year="2007"/>
</front>
<seriesInfo name="RFC" value="4918"/>
</reference>
</references>
<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
<t>
The definition of validator weakness has been expanded and clarified.
(<xref target="weak.and.strong.validators"/>)
</t>
<t>
Weak entity-tags are now allowed in all requests except range requests
(Sections <xref target="weak.and.strong.validators" format="counter"/> and
<xref target="header.if-none-match" format="counter"/>).
</t>
<t>
The <xref target="header.etag" format="none">ETag</xref> header field ABNF has been changed to not use
quoted-string, thus avoiding escaping issues.
(<xref target="header.etag"/>)
</t>
<t>
ETag is defined to provide an entity tag for the selected representation,
thereby clarifying what it applies to in various situations (such as a
PUT response).
(<xref target="header.etag"/>)
</t>
<t>
The precedence for evaluation of conditional requests has been defined.
(<xref target="precedence"/>)
</t>
</section>
<section title="Imported ABNF" anchor="imported.abnf">
<t>
The following core rules are included by
reference, as defined in Appendix B.1 of <xref target="RFC5234"/>:
ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
DIGIT (decimal 0-9), DQUOTE (double quote),
HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
OCTET (any 8-bit sequence of data), SP (space), and
VCHAR (any visible US-ASCII character).
</t>
<t>
The rules below are defined in <xref target="Part1"/>:
</t>
<figure><artwork type="abnf2616"><![CDATA[
OWS = <OWS, defined in [Part1], Section 3.2.3>
obs-text = <obs-text, defined in [Part1], Section 3.2.6>
]]></artwork></figure>
<t>
The rules below are defined in other parts:
</t>
<figure><artwork type="abnf2616"><![CDATA[
HTTP-date = <HTTP-date, defined in [Part2], Section 7.1.1.1>
]]></artwork></figure>
</section>
<section title="Collected ABNF" anchor="collected.abnf">
<t>
In the collected ABNF below, list rules are expanded as per Section 1.2 of <xref target="Part1"/>.
</t><figure>
<artwork type="abnf" name="p4-conditional.parsed-abnf"><![CDATA[
ETag = entity-tag
HTTP-date = <HTTP-date, defined in [Part2], Section 7.1.1.1>
If-Match = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
entity-tag ] ) )
If-Modified-Since = HTTP-date
If-None-Match = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS
entity-tag ] ) )
If-Unmodified-Since = HTTP-date
Last-Modified = HTTP-date
OWS = <OWS, defined in [Part1], Section 3.2.3>
entity-tag = [ weak ] opaque-tag
etagc = "!" / %x23-7E ; '#'-'~'
/ obs-text
obs-text = <obs-text, defined in [Part1], Section 3.2.6>
opaque-tag = DQUOTE *etagc DQUOTE
weak = %x57.2F ; W/
]]></artwork>
</figure>
</section>
<section title="Change Log (to be removed by RFC Editor before publication)" anchor="change.log">
<t>
Changes up to the first Working Group Last Call draft are summarized
in <eref target="http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-19#appendix-C"/>.
</t>
<section title="Since draft-ietf-httpbis-p4-conditional-19" anchor="changes.since.19">
<t>
Closed issues:
<list style="symbols">
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/241"/>:
"Need to clarify eval order/interaction of conditional headers"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/345"/>:
"Required headers on 304 and 206"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/350"/>:
"Optionality of Conditional Request Support"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/354"/>:
"ETags and Conditional Requests"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/361"/>:
"ABNF requirements for recipients"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/363"/>:
"Rare cases"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/365"/>:
"Conditional Request Security Considerations"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/371"/>:
"If-Modified-Since lacks definition for method != GET"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/372"/>:
"refactor conditional header field descriptions"
</t>
</list>
</t>
</section>
<section title="Since draft-ietf-httpbis-p4-conditional-20" anchor="changes.since.20">
<t>
<list style="symbols">
<t>
Conformance criteria and considerations regarding error handling are
now defined in Part 1.
</t>
</list>
</t>
</section>
<section title="Since draft-ietf-httpbis-p4-conditional-21" anchor="changes.since.21">
<t>
Closed issues:
<list style="symbols">
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/96"/>:
"Conditional GET text"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/350"/>:
"Optionality of Conditional Request Support"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/384"/>:
"unclear prose in definition of 304"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/401"/>:
"ETags and Conneg"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/402"/>:
"Comparison function for If-Match and If-None-Match"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/406"/>:
"304 without validator"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/427"/>:
"If-Match and 428"
</t>
</list>
</t>
</section>
<section title="Since draft-ietf-httpbis-p4-conditional-22" anchor="changes.since.22">
<t>
Closed issues:
<list style="symbols">
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/436"/>:
"explain list expansion in ABNF appendices"
</t>
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/437"/>:
"incorrect example dates"
</t>
</list>
</t>
<t>
Partly resolved issues:
<list style="symbols">
<t>
<eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/461"/>:
"Editorial suggestions"
</t>
</list>
</t>
</section>
</section>
</back>
</rfc>| PAFTECH AB 2003-2026 | 2026-04-23 20:33:58 |