Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nanocoap: incomplete response to /.well-known/core request #10731

Open
kb2ma opened this issue Jan 8, 2019 · 4 comments
Open

nanocoap: incomplete response to /.well-known/core request #10731

kb2ma opened this issue Jan 8, 2019 · 4 comments
Assignees
Labels
Area: CoAP Area: Constrained Application Protocol implementations Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@kb2ma
Copy link
Member

kb2ma commented Jan 8, 2019

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.

@kb2ma kb2ma added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: CoAP Area: Constrained Application Protocol implementations labels Jan 8, 2019
@kaspar030
Copy link
Contributor

@bergzand Maybe take a look?

@bergzand bergzand self-assigned this Jan 9, 2019
@stale
Copy link

stale bot commented Aug 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Aug 10, 2019
@kb2ma kb2ma removed the State: stale State: The issue / PR has no activity for >185 days label Aug 12, 2019
@miri64
Copy link
Member

miri64 commented Jul 4, 2020

Ping @bergzand (and maybe @chrysn and @cgundogan)?

@miri64 miri64 added this to the Release 2020.07 milestone Jul 4, 2020
@chrysn
Copy link
Member

chrysn commented Jul 5, 2020

The block options, when not supported by a library, should not need special treatment in the sense that any other critical option would need such a treatment as well.

A client application needs to handle any critical option that comes along. So we could check the options and hand an error to the client if any critical option is present. Or we require that the client check all critical options and abort on its own if it finds one unprocessable (as we implicitly do now, in my understanding). Or we allow the client to pass a set of options to the library which it promises to look into, and present an error if one is present that's not on the list.

I think we can (and should) do something about this, but it'll need some discussion, and it'd equally apply both to direct nanocoap applications and Gcoap (even though there may be options which Gcoap takes care of, and nanocoap won't).

@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CoAP Area: Constrained Application Protocol implementations Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

8 participants