nanocoap: incomplete response to /.well-known/core request #10731
Labels
Area: CoAP
Area: Constrained Application Protocol implementations
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
Description
nanocoap client does not receive a complete response when send blockwise, for example a response from a nanocoap server for /.well-known/core.
A gcoap client experiences the same problem, but this report focuses on nanocoap.
Steps to reproduce the issue
A nanocoap server's /.well-known/core resource uses the CoAP block extension to return the resource over multiple responses. Use nanocoap_get() or nanocoap_receive() to retrieve it. See an example when using the nanocoap client CLI in #10640.
Expected results
Since nanocoap_(get|receive) do not understand the block2 option in the response, they should respond with some error code (negative value) to the caller.
Actual results
nanocoap_(get|receive) responds with the length of response from the server.
Versions
Error occurs with a request to nanocoap /.well-known/core since 2018.10 release, which started to use a block-based response.
The text was updated successfully, but these errors were encountered: