Closed kFYatek closed 5 years ago
Is it legal for the LwM2M server to include the
Accept
option in requests which are not supposed to be responded to with any payload at all, such as Execute?
Yes. It is not an error but also not explicitly supported. Furthermore, this is an IETF CoAP issue rather than an OMA LwM2M issue.
During the Warsaw TestFest, there was a certain server which included an
Accept
CoAP option in every request sent to the client - including operations such as Execute, even though the client is not supposed to respond with any content payload. Specifically, the POST request representing the Execute operation contained anAccept: text/plain
option.The LwM2M 1.0.1 TS refers to the
Accept
option as a possible option for Reads and as a mandatory option identifying the Discover operation (compare sections 8.2.3 and 8.2.5). However, it does not say anything about this option being present in other kinds of operations.Section 8.1 reads:
Similar wording is also used in RFC 7252, section 5.10.4.
Since the response to the Execute operation does not include any payload, it may be argued that "Content-Format of text/plain cannot be returned" by the client in response. On the other hand, the client does not need to use any conflicting format, so the expected response without any content is not in direct violation of what the server requests.
All in all, the question is: Is it legal for the LwM2M server to include the
Accept
option in requests which are not supposed to be responded to with any payload at all, such as Execute?