The 208 (Already Reported) status code can be used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly. For each binding to a collection inside the request's scope, only one will be reported with a 200 status, while subsequent DAV:response elements for all other bindings will use the 208 status, and no DAV:response elements for their descendants are included.
The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
The actual current instance might not be available except by combining this response with other previous or future responses, as appropriate for the specific instance-manipulation(s). If so, the headers of the resulting instance are the result of combining the headers from the 226 response and the other instances, following the rules in Combining Headers of the HTTP/1.1 specification.
The request MUST have included an A-IM header field listing at least one instance-manipulation. The response MUST include an Etag header field giving the entity tag of the current instance.
A response received with a status code of 226 MAY be stored by a cache and used in reply to a subsequent request, subject to the HTTP expiration mechanism and any Cache-Control headers, and to the requirements in Caching rules for 226 responses
A response received with a status code of 226 MAY be used by a cache, in conjunction with a cache entry for the base instance, to create a cache entry for the current instance.
Wikipedia
The members of a DAV binding have already been enumerated in a previous reply to this request, and are not being included again.
Combining Headers
When a cache makes a validating request to a server, and the server provides a 304 (Not Modified) response or a 206 (Partial Content) response, the cache then constructs a response to send to the requesting client.
If the status code is 304 (Not Modified), the cache uses the entity- body stored in the cache entry as the entity-body of this outgoing response. If the status code is 206 (Partial Content) and the ETag or Last-Modified headers match exactly, the cache MAY combine the contents stored in the cache entry with the new contents received in the response and use the result as the entity-body of this outgoing response, (see 13.5.4).
The end-to-end headers stored in the cache entry are used for the constructed response, except that
- any stored Warning headers with warn-code 1xx MUST be deleted from the cache entry and the forwarded response.
- any stored Warning headers with warn-code 2xx MUST be retained in the cache entry and the forwarded response.
- any end-to-end headers provided in the 304 or 206 response MUST replace the corresponding headers from the cache entry.
Unless the cache decides to remove the cache entry, it MUST also replace the end-to-end headers stored with the cache entry with corresponding headers received in the incoming response, except for Warning headers as described immediately above. If a header field- name in the incoming response matches more than one header in the cache entry, all such old headers MUST be replaced.
In other words, the set of end-to-end headers received in the incoming response overrides all corresponding end-to-end headers stored with the cache entry (except for stored Warning headers with warn-code 1xx, which are deleted even if not overridden).
Note: this rule allows an origin server to use a 304 (Not Modified) or a 206 (Partial Content) response to update any header associated with a previous response for the same entity or sub- ranges thereof, although it might not always be meaningful or correct to do so. This rule does not allow an origin server to use a 304 (Not Modified) or a 206 (Partial Content) response to entirely delete a header that it had provided with a previous response.
Caching rules for 226 responses
When a client or proxy receives a 226 (IM Used) response, it MAY use
this response to create a cache entry in three ways:
1. It MAY decode all of the instance-manipulations to recover the
original instance, and store that instance in the cache. In
this case, the recovered instance is stored as a status-200
response, and MUST be used in accordance with the normal HTTP
caching rules.
2. It MAY decode all of the instance-manipulations except for
range selection(s), and store the result in the cache. In this
case, the result is stored as a status-206 response, and MUST
be used in accordance with the normal HTTP caching rules for
Partial Content.
3. It MAY store the status-226 (IM Used) response as a cache
entry.
A status-226 cache entry MUST NOT be used in response to a subsequent
request under any of these conditions (a cache that never stores
status-226 responses may ignore these tests):
1. If any of the instance-manipulation values from the IM header
field in the cached response do not appear in the subsequent
request's A-IM header field. The comparison between the
headers is done using an exact match on each instance-
manipulation value including any associated imparams values
2. If the order of instance-manipulation values appearing in the
cached IM header field differs from the order of that set of
instance-manipulations in the A-IM header field of the
subsequent request.
3. If the cache implementation is not aware of, or is not at least
conditionally compliant with, the specification of any of the
instance-manipulation values in the cached IM header field.Note: This rule allows for extending the set of instance-
manipulations without causing deployed cache implementations to
commit errors. The specification of new instance-manipulations
may include additional caching rules to improve cache-hit rates
in cognizant implementations.
4. If any of the instance-manipulation values in the cached IM
header field is a delta-coding, and the cache entry includes a
Delta-Base header field, and that Delta-Base entity tag is not
one of the entity tags listed in an If-None-Match header field
of the subsequent request.
5. If any of the instance-manipulation values in the cached IM
header field is a delta-coding, the cache entry does not
include a Delta-Base header field, and the If-None-Match header
field of the request that led to that cache entry does not
match the If-None-Match header field of the subsequent request.
If the IM header field of the cached response includes the "range"
instance-manipulation, then a status-226 cache entry MUST NOT be used
in response to a subsequent request if the cached response is
inconsistent with the Range header field value(s) in the request, as
would be the case for a cached 206 (Partial Content) response.
Note: we know of no existing, published formal specification for
deciding if a cached status-206 response is consistent with a
subsequent request. We believe that either of these conditions is
sufficient:
1. The ranges specified in the headers of the request that led
to the cached response are the same as specified in the
headers of the subsequent request.
2. The ranges specified in the cached response are the same as
specified in the headers of the subsequent request.
Further analysis might be necessary.
Comments
Post a Comment