Discussion:
[core] [Technical Errata Reported] RFC7252 (4948)
RFC Errata System
2017-02-22 21:00:04 UTC
Permalink
The following errata report has been submitted for RFC7252,
"The Constrained Application Protocol (CoAP)".

--------------------------------------
You may review the report below and at:
http://www.rfc-editor.org/errata_search.php?rfc=7252&eid=4948

--------------------------------------
Type: Technical
Reported by: Klaus Hartke <***@tzi.org>

Section: 5.6

Original Text
-------------
For a presented request, a CoAP endpoint MUST NOT use a stored
response, unless:

o the presented request method and that used to obtain the stored
response match,

o all options match between those in the presented request and those
of the request used to obtain the stored response (which includes
the request URI), except that there is no need for a match of any
request options marked as NoCacheKey (Section 5.4) or recognized
by the Cache and fully interpreted with respect to its specified
cache behavior (such as the ETag request option described in
Section 5.10.6; see also Section 5.4.2), and

o the stored response is either fresh or successfully validated as
defined below.

The set of request options that is used for matching the cache entry
is also collectively referred to as the "Cache-Key".

Corrected Text
--------------
For a presented request, a CoAP endpoint MUST NOT use a stored
response, unless:

o [...]

o [...]

o the payload of the presented request and the payload of the
request used to obtain the stored response match, and

o [...]

The set of request options that is used for matching the cache entry
plus (if applicable) the request payload are also collectively referred
to as the "Cache-Key".

Notes
-----
CoAP servers may return error responses in reply to requests that are invalid at the CoAP level (e.g., 4.02 Bad Option if the client includes an unrecognized option) or at the application level above (e.g., 4.00 Bad Request if the client includes a malformed payload according to application semantics).

If the error response does not depend on the request payload, then it is desirable that repeated requests that differ only in the payload can be satisfied with the same cached response. E.g., repeated requests for a non-existing resource should result in a cached 4.04 Not Found response as often as possible, regardless of the payload, rather than hit the server every time.

If the error response depends on the request payload, then it is not desirable that cached responses are reused for repeated requests that differ only in the payload. E.g., a client should not receive an error response for a valid request payload because another client sent an identical request but with a malformed request payload. In this case, including the request payload in the Cache-Key would give the expected result.

The original text does not include the request in the Cache-Key, which may lead to unexpected results. The corrected text changes that.

Since CoAP does not provide any indication in responses to distinguish between the two cases, caches generally cannot determine whether the response depends on the request payload or not and thus must always include the request payload in the Cache-Key to give the expected result. (As an exception, a cache at an origin server may be able to determine whether a cached response depends on the request payload or not, and thus can reuse responses accordingly. This already applies to responses that do not depend on the request method.)

Instructions:
-------------
This erratum is currently posted as "Reported". If necessary, please
use "Reply All" to discuss whether it should be verified or
rejected. When a decision is reached, the verifying party
can log in to change the status and edit the report, if necessary.

--------------------------------------
RFC7252 (draft-ietf-core-coap-18)
--------------------------------------
Title : The Constrained Application Protocol (CoAP)
Publication Date : June 2014
Author(s) : Z. Shelby, K. Hartke, C. Bormann
Category : PROPOSED STANDARD
Source : Constrained RESTful Environments APP
Area : Applications
Stream : IETF
Verifying Party : IESG

Loading...