[riot-notifications] [RIOT-OS/RIOT] nanocoap: add coap_opt_put_uri() (#15830)
notifications at github.com
Thu Jan 21 15:44:06 CET 2021
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
### Contribution description
The URI is passed as a string to `suit_coap_get_blockwise()`.
It may contain query parameters, those will not be translated properly to CoAP options if `coap_opt_put_uri_path()` is used.
To fix this, add a function `coap_opt_put_uri()` that handles both path and query parameters.
### Testing procedure
Pass a URI in the form of `path/to/resource?foo=bar&baz=bla` to `suit_coap_get_blockwise()`.
### Issues/PRs references
Examples: Fixes #1234. See also #5678. Depends on PR #9876.
Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* nanocoap: add coap_opt_put_string_with_len()
* nanocoap: add coap_opt_put_uri()
* suit/transport/coap: use coap_opt_put_uri()
-- File Changes --
M sys/include/net/nanocoap.h (37)
M sys/net/application_layer/nanocoap/nanocoap.c (23)
M sys/suit/transport/coap.c (5)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications