koap icon indicating copy to clipboard operation
koap copied to clipboard

Can't decode Token of length 6

Open anuar2k opened this issue 1 year ago • 0 comments

Per CoAP spec, the TKL field is in range of 0 to 8. At the same time, the logic which parses variable-sized integers only supports inputs of 0,1,2,3,4 and 8 bytes. I believe this is the relevant line.

This makes https://juullabs.github.io/koap/ unable to decode messages like 568400004f6273657277, which has TKL of 6. I suppose that TKLs of 5 and 7 aren't supported, too.

anuar2k avatar Oct 07 '24 10:10 anuar2k