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

core: add custom function to check emergency URN #6

Closed
wants to merge 1 commit into from

Conversation

anmartan
Copy link

@anmartan anmartan commented Jul 4, 2024

Pre-Submission Checklist

  • Commit message has the format required by CONTRIBUTING guide
  • Commits are split per component (core, individual modules, libs, utils, ...)
  • Each component has a single commit (if not, squash them into one commit)
  • No commits to README files for modules (changes must be done to docbook files
    in doc/ subfolder, the README file is autogenerated)

Type Of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)

Checklist:

  • PR should be backported to stable branches
  • Tested changes locally
  • Related to issue #XXXX (replace XXXX with an open issue number)

Description

Improved URN parsing according to RFC8141 that allows an arbitrary number of colons to be present in the URN value. Entire URN NID and NSS parts (except for urn: scheme) are stored in the uri.host struct field. rq-components are not supported.

Example of the parse error when parsing "urn:emergency:service:sos"

parse_uri(): bad char ':' in state 3 parsed: urn:emergency:service (21) / urn:emergency:service:sos (25)

URN values that have been tested to work:

  • urn:emergency:service:sos
  • urn:emergency:responder.fire
  • urn:emergency:media-feature

@anmartan anmartan force-pushed the check_emergency_urn_function branch 3 times, most recently from b3f7810 to f02261b Compare July 5, 2024 11:14
@anmartan anmartan force-pushed the check_emergency_urn_function branch 2 times, most recently from 6dd23f2 to e73b321 Compare July 5, 2024 12:25
@anmartan anmartan requested a review from IvanRibakov July 5, 2024 12:25
@anmartan anmartan force-pushed the check_emergency_urn_function branch from e73b321 to 3e675db Compare July 5, 2024 12:37
- Improved URN parsing to allow consuming URNs that contain 3 or more colons. Previosly URI parser treated some of the colons as separator between host and port causing the URN parsing to fail.
@anmartan anmartan force-pushed the check_emergency_urn_function branch from 3e675db to 95dc93a Compare July 5, 2024 12:40
@IvanRibakov
Copy link
Member

Looks good to proceed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants