koap icon indicating copy to clipboard operation
koap copied to clipboard

Parse unknown options as opaque instead of failing the whole message

Open zalenskivolt opened this issue 2 years ago • 1 comments

Currently it is not possible to see anything about a message that includes an unsupported option, except that option number.

For example, the UDP message 40020011c13cffd1e91a8401020304: "Unsupported option number 258"

(Option 258 is the No-Response option RFC-7967, listed in IANA CoAP Option Numbers)

Removing the unsupported option, 40020011c13cff8401020304, you get to see the full message details:

Message: { "type": "Confirmable", "code": "POST", "id": 17, "token": 0, "options": [ "Content-Format: application/cbor" ] }

Payload (CBOR): [1, 2, 3, 4]

It would be nice if unsupported options could be listed as opaque option number, value pairs in the options list, perhaps with a warning at the end.

zalenskivolt avatar Apr 11 '23 16:04 zalenskivolt

This sounds like a good request, but admittedly, I don't have a lot of time to work on KoAP these days. PRs are welcome, otherwise I will try to get to it eventually.

twyatt avatar Apr 11 '23 19:04 twyatt

Great! Finally got around to learn a bit of kotlin and make an attempt in #328 😄

zalenskivolt avatar Mar 19 '25 23:03 zalenskivolt