We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
quirks::set_port()
In browsers (tested on Chrome, Firefox and Safari), doing the following:
const u = new URL("https://example.com:8000"); u.port = "\u00009000"; console.log(u.port);
will show port 8000 (unchanged). This is also tested in the WPT suite here: https://github.com/web-platform-tests/wpt/blob/2a64dae4641fbd61bd4257df460e188f425b492e/url/url-setters-stripping.any.js#L85-L91. That's how the bug came to my attention.
8000
Doing the same using:
let mut url = url::Url::parse("http://example.com:8000").unwrap(); url::quirks::set_port(&mut url, "\u{0000}9000").unwrap(); assert_eq!(url.port(), Some(8000));
will panic with url.port() returning None.
url.port()
None
The text was updated successfully, but these errors were encountered:
Add a test for and fix issue #974 (#975)
7eccac9
* Add a test for issue 974 * Fix the issue * rename test
Successfully merging a pull request may close this issue.
In browsers (tested on Chrome, Firefox and Safari), doing the following:
will show port
8000
(unchanged). This is also tested in the WPT suite here: https://github.com/web-platform-tests/wpt/blob/2a64dae4641fbd61bd4257df460e188f425b492e/url/url-setters-stripping.any.js#L85-L91. That's how the bug came to my attention.Doing the same using:
will panic with
url.port()
returningNone
.The text was updated successfully, but these errors were encountered: