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

Fix match-ports to handle a null input port #435

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

antosart
Copy link
Member

@antosart antosart commented May 20, 2020

@antosart
Copy link
Member Author

I have the impression that the match-ports algorithm, as currently written, does not match an empty port with an empty port, while I believe it should.

@annevk
Copy link
Member

annevk commented May 20, 2020

Another problem here is that default port is an integer, not a string.

@annevk
Copy link
Member

annevk commented May 20, 2020

Also, the caller can pass in null which isn't the empty string, that's another problem.

@antosart
Copy link
Member Author

I am confused. Looking at where the algorithm is called, a url's port should be either null or an integer. Interestingly, however, a few lines later, although with the same wording, it seems that a url's port (note the different link) is a possibly empty string.

So is a url's port a nullable integer or a string?

@annevk
Copy link
Member

annevk commented May 27, 2020

It links the wrong concepts. For host too. That should use [=url/port=] I think or <a for=url>port</a>.

@antosart
Copy link
Member Author

Ok, so the inputs of the algorithm are actually a string or null (port A), an integer or null (port B) and a (possibly empty) string (scheme B).

@antosart
Copy link
Member Author

It is however confusing that one of the ports is a string and the other an integer.

@annevk
Copy link
Member

annevk commented May 27, 2020

In part this stems from the CSP parser not being defined in detail I suspect.

Base automatically changed from master to main February 16, 2021 23:21
@ciaramcmullin ciaramcmullin added the clarification The standard is unclear or ambiguous label Dec 4, 2024
@antosart antosart changed the title Specify that match-ports matches an empty port with an empty port Fix match-ports to handle a null input port Dec 17, 2024
@antosart
Copy link
Member Author

Coming back to this. Parts of the issue is fixed, but the "port-part matches" algorithm is still expecting a non-null possibly-empty string while being called with null or a non-empty string. I've updated the PR to fix that.

@antosart antosart requested a review from annevk December 17, 2024 07:41
index.bs Outdated Show resolved Hide resolved
@antosart antosart merged commit 398a20e into w3c:main Dec 17, 2024
2 checks passed
@antosart antosart deleted the match-ports branch December 17, 2024 10:35
github-actions bot added a commit that referenced this pull request Dec 17, 2024
SHA: 398a20e
Reason: push, by antosart

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification The standard is unclear or ambiguous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants