Source: http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p4-conditional-latest-from-previous.diff.html
Timestamp: 2017-07-23 00:41:41
Document Index: 187287793

Matched Legal Cases: ['art2', 'art1', 'art6', 'art2', 'art1', 'art1', 'art6', 'art6', 'art2', 'art2', 'art1', 'art2', 'art6', 'art5', 'art6', 'art5', 'art1', 'art2', 'art1', 'art1', 'art2', 'art5', 'art6', 'art1', 'art1', 'art1', 'art2', 'art1']

Diff: draft-ietf-httpbis-p4-conditional-26.txt - draft-ietf-httpbis-p4-conditional-latest.txt draft-ietf-httpbis-p4-conditional-26.txt draft-ietf-httpbis-p4-conditional-latest.txt HTTPbis Working Group R. Fielding, Ed. HTTPbis Working Group R. Fielding, Ed.
Expires: August 10, 2014 February 6, 2014 Expires: December 3, 2014 June 2014
draft-ietf-httpbis-p4-conditional-26 draft-ietf-httpbis-p4-conditional-latest
The Hypertext Transfer Protocol (HTTP) is a stateless application- The Hypertext Transfer Protocol (HTTP) is a stateless application-
level protocol for distributed, collaborative, hypertext information level protocol for distributed, collaborative, hypertext information
skipping to change at page 1, line 33 ¶ skipping to change at page 1, line 33 ¶
The changes in this draft are summarized in Appendix D.2. _This is a temporary document for the purpose of tracking the
This Internet-Draft will expire on August 10, 2014. This Internet-Draft will expire on December 3, 2014.
skipping to change at page 3, line 18 ¶ skipping to change at page 3, line 18 ¶
4.2. 412 Precondition Failed . . . . . . . . . . . . . . . . . 18 4.2. 412 Precondition Failed . . . . . . . . . . . . . . . . . 18
5. Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5. Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 19
skipping to change at page 3, line 43 ¶ skipping to change at page 3, line 43 ¶
7.1. Status Code Registration . . . . . . . . . . . . . . . . . 21 7.1. Status Code Registration . . . . . . . . . . . . . . . . . 21
7.2. Header Field Registration . . . . . . . . . . . . . . . . 21 7.2. Header Field Registration . . . . . . . . . . . . . . . . 21
Appendix D. Change Log (to be removed by RFC Editor before Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
publication) . . . . . . . . . . . . . . . . . . . . 25 D.1. Since draft-ietf-httpbis-p4-conditional-24 . . . . . . . . 25 D.2. Since draft-ietf-httpbis-p4-conditional-25 . . . . . . . . 25 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 1. Introduction 1. Introduction
Conditional requests are HTTP requests [Part2] that include one or Conditional requests are HTTP requests [RFC7231] that include one or
[Part1]. [RFC7230].
cache updates [Part6]. Conditionals can also be applied to state- cache updates [RFC7234]. Conditionals can also be applied to state-
assume that the mapping of requests to a "selected representation" assume that the mapping of requests to a "selected representation"
(Section 3 of [Part2]) will be consistent over time if the server (Section 3 of [RFC7231]) will be consistent over time if the server
intends to take advantage of conditionals. Regardless, if the intends to take advantage of conditionals. Regardless, if the
mapping is inconsistent and the server is unable to select the mapping is inconsistent and the server is unable to select the
appropriate representation, then no harm will result when the appropriate representation, then no harm will result when the
precondition evaluates to false. precondition evaluates to false.
The conditional request preconditions defined by this specification The conditional request preconditions defined by this specification
(Section 3) are evaluated when applicable to the recipient (Section 3) are evaluated when applicable to the recipient
(Section 5) according to their order of precedence (Section 6). (Section 5) according to their order of precedence (Section 6).
defined in Section 2.5 of [Part1]. defined in Section 2.5 of [RFC7230].
notation of [RFC5234] with a list extension, defined in Section 7 of notation of [RFC5234] with a list extension, defined in Section 7 of
[Part1], that allows for compact definition of comma-separated lists [RFC7230], that allows for compact definition of comma-separated
using a '#' operator (similar to how the '*' operator indicates lists using a '#' operator (similar to how the '*' operator indicates
repetition). Appendix B describes rules imported from other repetition). Appendix B describes rules imported from other
documents. Appendix C shows the collected grammar with all list documents. Appendix C shows the collected grammar with all list
operators expanded to standard ABNF notation. operators expanded to standard ABNF notation.
2. Validators 2. Validators
modification dates (Section 2.2) and opaque entity tags modification dates (Section 2.2) and opaque entity tags
(Section 2.3). Additional metadata that reflects resource state has (Section 2.3). Additional metadata that reflects resource state has
been defined by various extensions of HTTP, such as WebDAV [RFC4918], been defined by various extensions of HTTP, such as Web Distributed
that are beyond the scope of this specification. A resource metadata Authoring and Versioning (WebDAV, [RFC4918]), that are beyond the
value is referred to as a "validator" when it is used within a scope of this specification. A resource metadata value is referred
precondition. to as a "validator" when it is used within a precondition.
skipping to change at page 6, line 17 ¶ skipping to change at page 6, line 17 ¶
format, then the origin server needs to incorporate additional format, then the origin server needs to incorporate additional
information in the validator to distinguish those representations. information in the validator to distinguish those representations.
In contrast, a "weak validator" is representation metadata that might In contrast, a "weak validator" is representation metadata that might
not change for every change to the representation data. This not change for every change to the representation data. This
weakness might be due to limitations in how the value is calculated, weakness might be due to limitations in how the value is calculated,
such as clock resolution or an inability to ensure uniqueness for all such as clock resolution, an inability to ensure uniqueness for all
possible representations of the resource, or due to a desire by the possible representations of the resource, or a desire of the resource
resource owner to group representations by some self-determined set owner to group representations by some self-determined set of
of equivalency rather than unique sequences of data. An origin equivalency rather than unique sequences of data. An origin server
server SHOULD change a weak entity-tag whenever it considers prior SHOULD change a weak entity-tag whenever it considers prior
representations to be unacceptable as a substitute for the current representations to be unacceptable as a substitute for the current
representation. In other words, a weak entity-tag ought to change representation. In other words, a weak entity-tag ought to change
whenever the origin server wants caches to invalidate old responses. whenever the origin server wants caches to invalidate old responses.
skipping to change at page 7, line 24 ¶ skipping to change at page 7, line 24 ¶
An origin server SHOULD send Last-Modified for any selected An origin server SHOULD send Last-Modified for any selected
representation for which a last modification date can be reasonably representation for which a last modification date can be reasonably
and consistently determined, since its use in conditional requests and consistently determined, since its use in conditional requests
and evaluating cache freshness ([Part6]) results in a substantial and evaluating cache freshness ([RFC7234]) results in a substantial
reduction of HTTP traffic on the Internet and can be a significant reduction of HTTP traffic on the Internet and can be a significant
factor in improving service scalability and reliability. factor in improving service scalability and reliability.
A representation is typically the sum of many parts behind the A representation is typically the sum of many parts behind the
skipping to change at page 8, line 25 ¶ skipping to change at page 8, line 25 ¶
current validator for the representation and, current validator for the representation and,
o That origin server reliably knows that the associated o That origin server reliably knows that the associated
representation did not change twice during the second covered by representation did not change twice during the second covered by
the presented validator. the presented validator.
Since, If-Unmodified-Since header field, because the client has a Since, If-Unmodified-Since, or If-Range header field, because the
cache entry, or If-Range for the associated representation, and client has a cache entry for the associated representation, and
skipping to change at page 8, line 50 ¶ skipping to change at page 8, line 50 ¶
Modified values are generated from different clocks, or at somewhat Modified values are generated from different clocks or at somewhat
The "ETag" header field in a response provides the current entity-tag The "ETag" header field in a response provides the current entity-tag
for the selected representation, as determined at the conclusion of for the selected representation, as determined at the conclusion of
handling the request. An entity-tag is an opaque validator for handling the request. An entity-tag is an opaque validator for
skipping to change at page 9, line 27 ¶ skipping to change at page 9, line 27 ¶
etagc = %x21 / %x23-7E / obs-text etagc = %x21 / %x23-7E / obs-text
; VCHAR except double quotes, plus obs-text ; VCHAR except double quotes, plus obs-text
Note: Previously, opaque-tag was defined to be a quoted-string Note: Previously, opaque-tag was defined to be a quoted-string
([RFC2616], Section 3.11), thus some recipients might perform ([RFC2616], Section 3.11); thus, some recipients might perform
backslash unescaping. Servers therefore ought to avoid backslash backslash unescaping. Servers therefore ought to avoid backslash
characters in entity tags. characters in entity tags.
An entity-tag can be more reliable for validation than a modification An entity-tag can be more reliable for validation than a modification
date in situations where it is inconvenient to store modification date in situations where it is inconvenient to store modification
dates, where the one-second resolution of HTTP date values is not dates, where the one-second resolution of HTTP date values is not
sufficient, or where modification dates are not consistently sufficient, or where modification dates are not consistently
maintained. maintained.
skipping to change at page 10, line 22 ¶ skipping to change at page 10, line 22 ¶
implementations might use a collision-resistant hash of implementations might use a collision-resistant hash of
representation content, a combination of various file attributes, or representation content, a combination of various file attributes, or
a modification timestamp that has sub-second resolution. a modification timestamp that has sub-second resolution.
An origin server SHOULD send ETag for any selected representation for An origin server SHOULD send an ETag for any selected representation
which detection of changes can be reasonably and consistently for which detection of changes can be reasonably and consistently
evaluating cache freshness ([Part6]) can result in a substantial evaluating cache freshness ([RFC7234]) can result in a substantial
the comparison context allows the use of weak validators or not: or not the comparison context allows the use of weak validators:
o Strong comparison: two entity-tags are equivalent if both are not o Strong comparison: two entity-tags are equivalent if both are not
weak and their opaque-tags match character-by-character. weak and their opaque-tags match character-by-character.
o Weak comparison: two entity-tags are equivalent if their opaque- o Weak comparison: two entity-tags are equivalent if their opaque-
tags match character-by-character, regardless of either or both tags match character-by-character, regardless of either or both
being tagged as "weak". being tagged as "weak".
The example below shows the results for a set of entity-tag pairs, The example below shows the results for a set of entity-tag pairs and
and both the weak and strong comparison function results: both the weak and strong comparison function results:
3.4 of [Part2]), and where the representations sent in response to a 3.4 of [RFC7231]), and where the representations sent in response to
GET request vary based on the Accept-Encoding request header field a GET request vary based on the Accept-Encoding request header field
(Section 5.3.4 of [Part2]): (Section 5.3.4 of [RFC7231]):
skipping to change at page 12, line 9 ¶ skipping to change at page 12, line 9 ¶
Note: Content codings are a property of the representation data, Note: Content codings are a property of the representation data,
so a strong entity-tag for a content-encoded representation has to so a strong entity-tag for a content-encoded representation has to
be distinct from the entity tag of an unencoded representation to be distinct from the entity tag of an unencoded representation to
prevent potential conflicts during cache updates and range prevent potential conflicts during cache updates and range
requests. In contrast, transfer codings (Section 4 of [Part1]) requests. In contrast, transfer codings (Section 4 of [RFC7230])
apply only during message transfer and do not result in distinct apply only during message transfer and do not result in distinct
entity-tags. entity-tags.
skipping to change at page 13, line 50 ¶ skipping to change at page 13, line 50 ¶
An origin server that receives an If-Match header field MUST evaluate An origin server that receives an If-Match header field MUST evaluate
the condition prior to performing the method (Section 5). If the the condition prior to performing the method (Section 5). If the
field-value is "*", the condition is false if the origin server does field-value is "*", the condition is false if the origin server does
not have a current representation for the target resource. If the not have a current representation for the target resource. If the
field-value is a list of entity-tags, the condition is false if none field-value is a list of entity-tags, the condition is false if none
of the listed tags match the entity-tag of the selected of the listed tags match the entity-tag of the selected
An origin server MUST NOT perform the requested method if a received An origin server MUST NOT perform the requested method if a received
If-Match condition evaluates to false; instead the origin server MUST If-Match condition evaluates to false; instead, the origin server
respond with either: a) the 412 (Precondition Failed) status code; MUST respond with either a) the 412 (Precondition Failed) status code
or, b) one of the 2xx (Successful) status codes if the origin server or b) one of the 2xx (Successful) status codes if the origin server
has verified that a state change is being requested and the final has verified that a state change is being requested and the final
state is already reflected in the current state of the target state is already reflected in the current state of the target
resource (i.e., the change requested by the user agent has already resource (i.e., the change requested by the user agent has already
succeeded, but the user agent might not be aware of it, perhaps succeeded, but the user agent might not be aware of it, perhaps
because the prior response was lost or a compatible change was made because the prior response was lost or a compatible change was made
by some other user agent). In the latter case, the origin server by some other user agent). In the latter case, the origin server
MUST NOT send a validator header field in the response unless it can MUST NOT send a validator header field in the response unless it can
verify that the request is a duplicate of an immediately prior change verify that the request is a duplicate of an immediately prior change
made by the same user agent. made by the same user agent.
skipping to change at page 15, line 5 ¶ skipping to change at page 15, line 5 ¶
stored responses that have entity-tags, the client SHOULD generate an stored responses that have entity-tags, the client SHOULD generate an
If-None-Match header field containing a list of those entity-tags If-None-Match header field containing a list of those entity-tags
when making a GET request; this allows recipient servers to send a when making a GET request; this allows recipient servers to send a
304 (Not Modified) response to indicate when one of those stored 304 (Not Modified) response to indicate when one of those stored
responses matches the selected representation. responses matches the selected representation.
If-None-Match can also be used with a value of "*" to prevent an If-None-Match can also be used with a value of "*" to prevent an
believes that the resource does not have a current representation believes that the resource does not have a current representation
(Section 4.2.1 of [Part2]). This is a variation on the "lost update" (Section 4.2.1 of [RFC7231]). This is a variation on the "lost
problem that might arise if more than one client attempts to create update" problem that might arise if more than one client attempts to
an initial representation for the target resource. create an initial representation for the target resource.
An origin server that receives an If-None-Match header field MUST An origin server that receives an If-None-Match header field MUST
evaluate the condition prior to performing the method (Section 5). evaluate the condition prior to performing the method (Section 5).
If the field-value is "*", the condition is false if the origin If the field-value is "*", the condition is false if the origin
server has a current representation for the target resource. If the server has a current representation for the target resource. If the
field-value is a list of entity-tags, the condition is false if one field-value is a list of entity-tags, the condition is false if one
An origin server MUST NOT perform the requested method if the An origin server MUST NOT perform the requested method if the
condition evaluates to false; instead, the origin server MUST respond condition evaluates to false; instead, the origin server MUST respond
with either a) the 304 (Not Modified) status code if the request with either a) the 304 (Not Modified) status code if the request
method is GET or HEAD; or, b) the 412 (Precondition Failed) status method is GET or HEAD or b) the 412 (Precondition Failed) status code
code for all other request methods. for all other request methods.
Requirements on cache handling of a received If-None-Match header Requirements on cache handling of a received If-None-Match header
field are defined in Section 4.3.2 of [Part6]. field are defined in Section 4.3.2 of [RFC7234].
The "If-Modified-Since" header field makes a GET or HEAD request The "If-Modified-Since" header field makes a GET or HEAD request
method conditional on the selected representation's modification date method conditional on the selected representation's modification date
being more recent than the date provided in the field-value. being more recent than the date provided in the field-value.
Transfer of the selected representation's data is avoided if that Transfer of the selected representation's data is avoided if that
data has not changed. data has not changed.
A recipient MUST ignore If-Modified-Since if the request contains an A recipient MUST ignore If-Modified-Since if the request contains an
If-None-Match header field; the condition in If-None-Match is If-None-Match header field; the condition in If-None-Match is
considered to be a more accurate replacement for the condition in If- considered to be a more accurate replacement for the condition in If-
Modified-Since and the two are only combined for the sake of Modified-Since, and the two are only combined for the sake of
interoperating with older intermediaries that might not implement If- interoperating with older intermediaries that might not implement If-
None-Match. None-Match.
A recipient MUST ignore the If-Modified-Since header field if the A recipient MUST ignore the If-Modified-Since header field if the
received field-value is not a valid HTTP-date, or if the request received field-value is not a valid HTTP-date, or if the request
method is neither GET nor HEAD. method is neither GET nor HEAD.
A recipient MUST interpret an If-Modified-Since field-value's A recipient MUST interpret an If-Modified-Since field-value's
timestamp in terms of the origin server's clock. timestamp in terms of the origin server's clock.
If-Modified-Since is typically used for two distinct purposes: 1) to If-Modified-Since is typically used for two distinct purposes: 1) to
allow efficient updates of a cached representation that does not have allow efficient updates of a cached representation that does not have
an entity-tag; and, 2) to limit the scope of a web traversal to an entity-tag and 2) to limit the scope of a web traversal to
resources that have recently changed. resources that have recently changed.
When used for cache updates, a cache will typically use the value of When used for cache updates, a cache will typically use the value of
the cached message's Last-Modified field to generate the field value the cached message's Last-Modified field to generate the field value
of If-Modified-Since. This behavior is most interoperable for cases of If-Modified-Since. This behavior is most interoperable for cases
where clocks are poorly synchronized or when the server has chosen to where clocks are poorly synchronized or when the server has chosen to
only honor exact timestamp matches (due to a problem with Last- only honor exact timestamp matches (due to a problem with Last-
Modified dates that appear to go "back in time" when the origin Modified dates that appear to go "back in time" when the origin
server's clock is corrected or a representation is restored from an server's clock is corrected or a representation is restored from an
archived backup). However, caches occasionally generate the field archived backup). However, caches occasionally generate the field
skipping to change at page 16, line 42 ¶ skipping to change at page 16, line 42 ¶
An origin server that receives an If-Modified-Since header field An origin server that receives an If-Modified-Since header field
SHOULD evaluate the condition prior to performing the method SHOULD evaluate the condition prior to performing the method
(Section 5). The origin server SHOULD NOT perform the requested (Section 5). The origin server SHOULD NOT perform the requested
method if the selected representation's last modification date is method if the selected representation's last modification date is
earlier than or equal to the date provided in the field-value; earlier than or equal to the date provided in the field-value;
instead, the origin server SHOULD generate a 304 (Not Modified) instead, the origin server SHOULD generate a 304 (Not Modified)
response, including only those metadata that are useful for response, including only those metadata that are useful for
identifying or updating a previously cached response. identifying or updating a previously cached response.
Requirements on cache handling of a received If-Modified-Since header Requirements on cache handling of a received If-Modified-Since header
3.4. If-Unmodified-Since 3.4. If-Unmodified-Since
The "If-Unmodified-Since" header field makes the request method The "If-Unmodified-Since" header field makes the request method
conditional on the selected representation's last modification date conditional on the selected representation's last modification date
being earlier than or equal to the date provided in the field-value. being earlier than or equal to the date provided in the field-value.
This field accomplishes the same purpose as If-Match for cases where This field accomplishes the same purpose as If-Match for cases where
the user agent does not have an entity-tag for the representation. the user agent does not have an entity-tag for the representation.
A recipient MUST ignore If-Unmodified-Since if the request contains A recipient MUST ignore If-Unmodified-Since if the request contains
an If-Match header field; the condition in If-Match is considered to an If-Match header field; the condition in If-Match is considered to
be a more accurate replacement for the condition in If-Unmodified- be a more accurate replacement for the condition in If-Unmodified-
Since and the two are only combined for the sake of interoperating Since, and the two are only combined for the sake of interoperating
with older intermediaries that might not implement If-Match. with older intermediaries that might not implement If-Match.
A recipient MUST ignore the If-Unmodified-Since header field if the A recipient MUST ignore the If-Unmodified-Since header field if the
received field-value is not a valid HTTP-date. received field-value is not a valid HTTP-date.
A recipient MUST interpret an If-Unmodified-Since field-value's A recipient MUST interpret an If-Unmodified-Since field-value's
If-Unmodified-Since is most often used with state-changing methods If-Unmodified-Since is most often used with state-changing methods
(e.g., POST, PUT, DELETE) to prevent accidental overwrites when (e.g., POST, PUT, DELETE) to prevent accidental overwrites when
skipping to change at page 17, line 36 ¶ skipping to change at page 17, line 36 ¶
does not supply entity-tags with its representations (i.e., to does not supply entity-tags with its representations (i.e., to
prevent the "lost update" problem). It can also be used with safe prevent the "lost update" problem). It can also be used with safe
methods to abort a request if the selected representation does not methods to abort a request if the selected representation does not
match one already stored (or partially stored) from a prior request. match one already stored (or partially stored) from a prior request.
An origin server that receives an If-Unmodified-Since header field An origin server that receives an If-Unmodified-Since header field
MUST evaluate the condition prior to performing the method MUST evaluate the condition prior to performing the method
(Section 5). The origin server MUST NOT perform the requested method (Section 5). The origin server MUST NOT perform the requested method
if the selected representation's last modification date is more if the selected representation's last modification date is more
recent than the date provided in the field-value; instead the origin recent than the date provided in the field-value; instead the origin
server MUST respond with either: a) the 412 (Precondition Failed) server MUST respond with either a) the 412 (Precondition Failed)
status code; or, b) one of the 2xx (Successful) status codes if the status code or b) one of the 2xx (Successful) status codes if the
origin server has verified that a state change is being requested and origin server has verified that a state change is being requested and
the final state is already reflected in the current state of the the final state is already reflected in the current state of the
target resource (i.e., the change requested by the user agent has target resource (i.e., the change requested by the user agent has
already succeeded, but the user agent might not be aware of that already succeeded, but the user agent might not be aware of that
because the prior response message was lost or a compatible change because the prior response message was lost or a compatible change
was made by some other user agent). In the latter case, the origin was made by some other user agent). In the latter case, the origin
server MUST NOT send a validator header field in the response unless server MUST NOT send a validator header field in the response unless
it can verify that the request is a duplicate of an immediately prior it can verify that the request is a duplicate of an immediately prior
change made by the same user agent. change made by the same user agent.
The If-Unmodified-Since header field can be ignored by caches and The If-Unmodified-Since header field can be ignored by caches and
intermediaries because it is not applicable to a stored response. intermediaries because it is not applicable to a stored response.
3.5. If-Range 3.5. If-Range
mechanism that is similar to the If-Match and If-Unmodified-Since mechanism that is similar to the If-Match and If-Unmodified-Since
header fields but instructs the recipient to ignore the Range header header fields but that instructs the recipient to ignore the Range
field if the validator doesn't match, resulting in transfer of the header field if the validator doesn't match, resulting in transfer of
new selected representation instead of a 412 response. If-Range is the new selected representation instead of a 412 (Precondition
defined in Section 3.2 of [Part5]. Failed) response. If-Range is defined in Section 3.2 of [RFC7233].
The 304 (Not Modified) status code indicates that a conditional GET The 304 (Not Modified) status code indicates that a conditional GET
or HEAD request has been received and would have resulted in a 200 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 (OK) response if it were not for the fact that the condition
evaluated to false. In other words, there is no need for the server evaluated to false. In other words, there is no need for the server
to transfer a representation of the target resource because the to transfer a representation of the target resource because the
request indicates that the client, which made the request request indicates that the client, which made the request
conditional, already has a valid representation; the server is conditional, already has a valid representation; the server is
therefore redirecting the client to make use of that stored therefore redirecting the client to make use of that stored
representation as if it were the payload of a 200 (OK) response. representation as if it were the payload of a 200 (OK) response.
The server generating a 304 response MUST generate any of the The server generating a 304 response MUST generate any of the
following header fields that would have been sent in a 200 (OK) following header fields that would have been sent in a 200 (OK)
response to the same request: Cache-Control, Content-Location, Date, response to the same request: Cache-Control, Content-Location, Date,
ETag, Expires, and Vary. ETag, Expires, and Vary.
when the recipient already has one or more cached representations, a when the recipient already has one or more cached representations, a
sender SHOULD NOT generate representation metadata other than the sender SHOULD NOT generate representation metadata other than the
above listed fields unless said metadata exists for the purpose of above listed fields unless said metadata exists for the purpose of
guiding cache updates (e.g., Last-Modified might be useful if the guiding cache updates (e.g., Last-Modified might be useful if the
response does not have an ETag field). response does not have an ETag field).
Requirements on a cache that receives a 304 response are defined in Requirements on a cache that receives a 304 response are defined in
Section 4.3.4 of [Part6]. If the conditional request originated with Section 4.3.4 of [RFC7234]. If the conditional request originated
an outbound client, such as a user agent with its own cache sending a with an outbound client, such as a user agent with its own cache
conditional GET to a shared proxy, then the proxy SHOULD forward the sending a conditional GET to a shared proxy, then the proxy SHOULD
304 response to that client. forward the 304 response to that client.
A 304 response cannot contain a message-body; it is always terminated A 304 response cannot contain a message-body; it is always terminated
by the first empty line after the header fields. by the first empty line after the header fields.
The 412 (Precondition Failed) status code indicates that one or more The 412 (Precondition Failed) status code indicates that one or more
conditions given in the request header fields evaluated to false when conditions given in the request header fields evaluated to false when
tested on the server. This response code allows the client to place tested on the server. This response code allows the client to place
preconditions on the current resource state (its current preconditions on the current resource state (its current
representations and metadata) and thus prevent the request method representations and metadata) and, thus, prevent the request method
from being applied if the target resource is in an unexpected state. from being applied if the target resource is in an unexpected state.
5. Evaluation 5. Evaluation
Except when excluded below, a recipient cache or origin server MUST Except when excluded below, a recipient cache or origin server MUST
evaluate received request preconditions after it has successfully evaluate received request preconditions after it has successfully
performed its normal request checks and just before it would perform performed its normal request checks and just before it would perform
the action associated with the request method. A server MUST ignore the action associated with the request method. A server MUST ignore
all received preconditions if its response to the same request all received preconditions if its response to the same request
without those conditions would have been a status code other than a without those conditions would have been a status code other than a
2xx or 412 (Precondition Failed). In other words, redirects and 2xx (Successful) or 412 (Precondition Failed). In other words,
failures take precedence over the evaluation of preconditions in redirects and failures take precedence over the evaluation of
conditional requests. preconditions in conditional requests.
A server that is not the origin server for the target resource and A server that is not the origin server for the target resource and
cannot act as a cache for requests on the target resource MUST NOT cannot act as a cache for requests on the target resource MUST NOT
evaluate the conditional request header fields defined by this evaluate the conditional request header fields defined by this
specification, and MUST forward them if the request is forwarded, specification, and it MUST forward them if the request is forwarded,
since the generating client intends that they be evaluated by a since the generating client intends that they be evaluated by a
server that can provide a current representation. Likewise, a server server that can provide a current representation. Likewise, a server
MUST ignore the conditional request header fields defined by this MUST ignore the conditional request header fields defined by this
specification when received with a request method that does not specification when received with a request method that does not
involve the selection or modification of a selected representation, involve the selection or modification of a selected representation,
such as CONNECT, OPTIONS, or TRACE. such as CONNECT, OPTIONS, or TRACE.
Conditional request header fields that are defined by extensions to Conditional request header fields that are defined by extensions to
HTTP might place conditions on all recipients, on the state of the HTTP might place conditions on all recipients, on the state of the
target resource in general, or on a group of resources. For target resource in general, or on a group of resources. For
skipping to change at page 21, line 7 ¶ skipping to change at page 21, line 7 ¶
* if true, continue to step 5 * if true, continue to step 5
5. When the method is GET and both Range and If-Range are present, 5. When the method is GET and both Range and If-Range are present,
evaluate the If-Range precondition: evaluate the If-Range precondition:
* if the validator matches and the Range specification is * if the validator matches and the Range specification is
applicable to the selected representation, respond 206 applicable to the selected representation, respond 206
(Partial Content) [Part5] (Partial Content) [RFC7233]
6. Otherwise, 6. Otherwise,
* all conditions are met, so perform the requested action and * all conditions are met, so perform the requested action and
respond according to its success or failure. respond according to its success or failure.
The HTTP Status Code Registry located at The "Hypertext Transfer Protocol (HTTP) Status Code Registry" located
<http://www.iana.org/assignments/http-status-codes> shall be updated at <http://www.iana.org/assignments/http-status-codes> has been
with the registrations below: updated with the registrations below:
7.2. Header Field Registration 7.2. Header Field Registration
HTTP header fields are registered within the Message Header Field HTTP header fields are registered within the "Message Headers"
Registry maintained at <http://www.iana.org/assignments/ registry maintained at
message-headers/message-header-index.html>. <http://www.iana.org/assignments/message-headers/>.
associated registry entries shall be updated according to the associated registry entries have been updated according to the
skipping to change at page 22, line 24 ¶ skipping to change at page 22, line 24 ¶
and users of known security concerns specific to the HTTP conditional and users of known security concerns specific to the HTTP conditional
addressed in HTTP messaging [Part1] and semantics [Part2]. addressed in HTTP "Message Syntax and Routing" [RFC7230] and
An entity-tag can be abused in ways that create privacy risks. For An entity-tag can be abused in ways that create privacy risks. For
skipping to change at page 22, line 48 ¶ skipping to change at page 22, line 49 ¶
entity-tag in later conditional requests as a means of re-identifying entity-tag in later conditional requests as a means of re-identifying
that user or user agent. Such an identifying tag would become a that user or user agent. Such an identifying tag would become a
persistent identifier for as long as the user agent retained the persistent identifier for as long as the user agent retained the
original cache entry. User agents that cache representations ought original cache entry. User agents that cache representations ought
to ensure that the cache is cleared or replaced whenever the user to ensure that the cache is cleared or replaced whenever the user
performs privacy-maintaining actions, such as clearing stored cookies performs privacy-maintaining actions, such as clearing stored cookies
or changing to a private browsing mode. or changing to a private browsing mode.
See Section 10 of [Part1]. See Section 10 of [RFC7230].
[Part1] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
draft-ietf-httpbis-p1-messaging-26 (work in progress), draft-ietf-httpbis-p1-messaging-latest (work in progress),
February 2014. June 2014.
[Part2] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
draft-ietf-httpbis-p2-semantics-26 (work in progress), draft-ietf-httpbis-p2-semantics-latest (work in progress),
[Part5] Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., [RFC7233] Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed.,
draft-ietf-httpbis-p5-range-26 (work in progress), draft-ietf-httpbis-p5-range-latest (work in progress),
[Part6] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,
draft-ietf-httpbis-p6-cache-26 (work in progress), draft-ietf-httpbis-p6-cache-latest (work in progress),
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008. 10.2. Informative References 10.2. Informative References
skipping to change at page 24, line 23 ¶ skipping to change at page 24, line 23 ¶
The rules below are defined in [Part1]: The rules below are defined in [RFC7230]:
OWS = <OWS, defined in [Part1], Section 3.2.3> OWS = <OWS, see [RFC7230], Section 3.2.3>
obs-text = <obs-text, defined in [Part1], Section 3.2.6> obs-text = <obs-text, see [RFC7230], Section 3.2.6>
HTTP-date = <HTTP-date, defined in [Part2], Section 7.1.1.1> HTTP-date = <HTTP-date, see [RFC7231], Section 7.1.1.1>
In the collected ABNF below, list rules are expanded as per Section In the collected ABNF below, list rules are expanded as per Section
1.2 of [Part1]. 1.2 of [RFC7230].
Appendix D. Change Log (to be removed by RFC Editor before publication) Changes up to the IETF Last Call draft are summarized in <http:// tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-24#appendix-D>. D.1. Since draft-ietf-httpbis-p4-conditional-24 Closed issues: o <http://tools.ietf.org/wg/httpbis/trac/ticket/518>: "APPSDIR review of draft-ietf-httpbis-p4-conditional-24" D.2. Since draft-ietf-httpbis-p4-conditional-25 Closed issues: o <http://tools.ietf.org/wg/httpbis/trac/ticket/538>: "add 'stateless' to Abstract" o <http://tools.ietf.org/wg/httpbis/trac/ticket/542>: "improve introduction of list rule" o <http://tools.ietf.org/wg/httpbis/trac/ticket/549>: "augment security considerations with pointers to current research" Index Index
End of changes. 64 change blocks. 134 lines changed or deleted 107 lines changed or added