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

Make the port of Origin be an Option<u16> #989

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrobinson
Copy link
Member

@mrobinson mrobinson commented Oct 31, 2024

The URL specification changed in 2016 1 2 such that now the origin's port
should be the same as the URL's port. This means that the port can
None in the case that it is the default port for a scheme.

Fixes #821.

Footnotes

  1. https://github.com/whatwg/url/commit/b0e4def5b62e0be2d75b4b7b5720a5e0ea879596

  2. https://github.com/whatwg/html/pull/870

The URL specification changed in 2016 [1] [2] such that now the origin's port
should be the same as the URL's port. This means that the port can
`None` in the case that it is the default port for a scheme.

1. whatwg/url@b0e4def
2. whatwg/html#870

Fixes #821.
@Manishearth
Copy link
Member

Is this not a breaking change?

@mrobinson
Copy link
Member Author

Is this not a breaking change?

Yes, I think it is. I've tried to add the breaking change label.

@Manishearth
Copy link
Member

oh, duh. didn't notice that.

The change itself seems good, I imagine we have to leave this PR open until we're ready to make breaking changes again?

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

Successfully merging this pull request may close these issues.

Origin port as an Option<u16>
2 participants