PelionIoT / mbed-coap

CoAP C library - Builder and Parser for CoAP messages
Apache License 2.0
29 stars 16 forks source link

sn_coap_header_validity_check should not check the Message Code #65

Open jimsch opened 6 years ago

jimsch commented 6 years ago

There is no reason for the code to be checking for a legal value of the message code in this function. By doing so you eliminate the code calling the functions from using new codes which are not directly supported. In my case I need to use FETCH in a message I am sending. There are no new requirements placed on the library to do so so forbidding it from happening does not make sense. Thing will be true of servers which might want to use new error codes such as the upcoming 4.29 Too Many Requests.

ciarmcom commented 6 years ago

ARM Internal Ref: IOTCLT-2887