Skip to content

Improve URI option decomposition to better match CoAP RFC 7252#116

Merged
Covertness merged 2 commits intoCovertness:masterfrom
frantp:master
Jun 15, 2025
Merged

Improve URI option decomposition to better match CoAP RFC 7252#116
Covertness merged 2 commits intoCovertness:masterfrom
frantp:master

Conversation

@frantp
Copy link
Contributor

@frantp frantp commented Jun 13, 2025

This PR updates the URI decomposition logic to better conform to the CoAP specification (section 6.4), addressing the following points:

  • Uri-Host (Point 5)

    If the component of |url| does not represent the request's destination IP address as an IP-literal or IPv4address, include a Uri-Host Option [...]

    The implementation now omits the Uri-Host option when the <host> component is an IP address.

  • Uri-Query (Point 9)

    [...] for each argument in the component, include a Uri-Query Option and let that option's value be the argument (not including the question mark and the delimiting ampersand characters) [...]

    Query arguments are now correctly split and included as separate Uri-Query options. The API for RequestBuilder is modified to support this change.

@Covertness
Copy link
Owner

LGTM

@Covertness Covertness merged commit 93be565 into Covertness:master Jun 15, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants