-
Notifications
You must be signed in to change notification settings - Fork 2k
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_sock: always use coap_opt_put_uri_pathquery() #20245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in the sense that it is probably what people need and looks correct from an implementation PoV.
The docs will need updating in all the functions like nanocoap_sock_get that previously speak of a "remote path" to now say "remote path and query".
And it is an API change, moreover, one that is not trivially raising compiler warnings. Given that it's likely reflecting any user's intention, it should suffice to add the right labels to make sure it gets a prominent note in the change log.
8057e9c
to
eb76b8e
Compare
To me it feels more like a bug fix than an API change - when I added the functions I was not aware of the difference between |
Is there anything I can do to move this forward? |
Thank you! |
Contribution description
This is pretty subtle:
coap_opt_put_uri_pathquery()
will detect the presense of a query parameter,coap_opt_put_uri_path()
will not.That means that when you request
path/to/resource?option=1
withcoap_opt_put_uri_path()
you get the pathresource?option=1
whereas withcoap_opt_put_uri_pathquery()
you get the pathresource
with query parameteroption=1
.We really want the latter.
Testing procedure
Issues/PRs references