Subject: [core] WGLC draft-ietf-core-coap-13 Critical Options and 4.02 Bad Option

From: "Angelo P. Castellani" <[email-masked]>
Date: Thu, 10 Jan 2013 16:28:52 +0100

Dear WG,

in the current CoAP specification a server MUST issue a "4.02 Bad
Option" response either if:
A. an option is malformed
B. an option is unrecognized

The case B seems inconsistent with the current definition of the 4.xx
class of response codes (Client Error).

If a client sends a valid and well-formed critical option to a server
that does not implements it, the server tells the client that the
error is from its side. I believe that a better response code for this
scenario is either:
1. The existing response code  "5.01 Not Implemented"
2. A new response code "5.06 Option Not Supported"

Best,
Angelo

=====

Referenced text:

5.4.1.  Critical/Elective

   Options fall into one of two classes: "critical" or "elective".

[...]

   o  Unrecognized options of class "critical" that occur in a
      confirmable request MUST cause the return of a 4.02 (Bad Option)
      response.  This response SHOULD include a diagnostic payload
      describing the unrecognized option(s) (see Section 5.5.2).

[...]

5.9.2.  Client Error 4.xx

   This class of response code is intended for cases in which the client
   seems to have erred.  These response codes are applicable to any
   request method.

[...]

5.9.2.3.  4.02 Bad Option

   The request could not be understood by the server due to one or more
   unrecognized or malformed options.  The client SHOULD NOT repeat the
   request without modification.