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?

@mrobinson
Copy link
Member Author

Any word on when a major release will happen in order to merge this one?

@Manishearth
Copy link
Member

I think we just did a major release, so not soon?

@mrobinson
Copy link
Member Author

What's the process on making sure this change makes it into the next release if it looks okay to the reviewers here?

@mrobinson mrobinson requested a review from valenting December 9, 2024 22:45
@Manishearth
Copy link
Member

I don't believe there is one, the URL crate does breaking changes extremely rarely, and when that happens people will probably go through the issue tracker and find breakages to batch together.

We could add a "breaking" label.

Perhaps there's a way to make this change non breaking?

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