wakaama icon indicating copy to clipboard operation
wakaama copied to clipboard

Internal Server Error caused by PRV_JSON_BUFFER_SIZE

Open qleisan opened this issue 4 years ago • 1 comments

senml_json_serialize() has a buffer size PRV_JSON_BUFFER_SIZE set to 1024.

This causes "Internal Server Error" when doing GET on a larger resource using SENML_JSON. When using TLV (no longer default in the client) this is not a problem. Is this acceptable/according to spec?

Reported by @tuve in #461

qleisan avatar Jan 27 '21 09:01 qleisan

Regarding CoAP response code definition, I guess in this case INTERNAL_SERVER_ERROR is the best choice.

Note eventually an error/diagnostic message can be added too : https://tools.ietf.org/html/rfc7252#section-5.5.2.

Maybe in this particular use case the issue is more that we are able to write a given payload but not to read it. In an ideal world all buffer sizes should be configured in a more consistent way. (Not sure if this is doable easily :sweat_smile:)

sbernard31 avatar Jan 27 '21 09:01 sbernard31