Skip to content

Fix edge case with relative SMP URLs#19

Closed
raphaelm wants to merge 1 commit intoiterasdev:masterfrom
raphaelm:naptr-relative
Closed

Fix edge case with relative SMP URLs#19
raphaelm wants to merge 1 commit intoiterasdev:masterfrom
raphaelm:naptr-relative

Conversation

@raphaelm
Copy link
Copy Markdown
Collaborator

This fixes an issue observed in the wild with the following NAPTR record:

100 10 "U" "Meta:SMP" "!.*!https://smp.service.afasonline.com/smp!" .

which needs to be resolved to https://smp.service.afasonline.com/smp/iso6523-actorid-upis:: not https://smp.service.afasonline.com/iso6523-actorid-upis::

Unfortunately, the spec seems a little fuzzy on this.

@arj03
Copy link
Copy Markdown
Collaborator

arj03 commented Feb 27, 2026

I don't understand the comment at all :)

The URL should be used as defined right? https://smp.service.afasonline.com/smp is different from https://smp.service.afasonline.com/smp/. Oxalis used specifically as4 and not as4/

@raphaelm
Copy link
Copy Markdown
Collaborator Author

Yes, the URL should be used as defined, it's about how it's combined. So if DNS says

100 10 "U" "Meta:SMP" "!.*!https://smp.service.afasonline.com/smp!" .

do we need

a) https://smp.service.afasonline.com/smpiso6523-actorid-upis::$participant
b) https://smp.service.afasonline.com/smp/iso6523-actorid-upis::$participant
c) https://smp.service.afasonline.com/iso6523-actorid-upis::$participant

The current code tries to reach (c), which does not work. With this PR, it uses (b), because the / at the end helps Python's urljoin that this is supposed to be a path. Simple concatenation would yield (a), which I think is also wrong.

@raphaelm
Copy link
Copy Markdown
Collaborator Author

I had introduced the urljoin() in #17 since I had seem some NAPTR records contain /smp/ and then it would previously cause a // in the URL which did not work.

We could probably also go for:

    return result.rstrip("/") + "/iso6523-actorid-upis::" + participant_id

@arj03
Copy link
Copy Markdown
Collaborator

arj03 commented Feb 27, 2026

Thanks, I've applied the last one. Will do a release now.

@arj03 arj03 closed this Feb 27, 2026
@raphaelm
Copy link
Copy Markdown
Collaborator Author

Thank you!

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