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

wrong result after setting port to a string that doesn't parse as a number #46861

Closed
meixg opened this issue Feb 27, 2023 · 1 comment
Closed
Labels
whatwg-url Issues and PRs related to the WHATWG URL implementation.

Comments

@meixg
Copy link
Member

meixg commented Feb 27, 2023

Version

v20.0.0-pre

Platform

Linux meixg-desktop 5.11.0-43-generic #47~20.04.2-Ubuntu SMP Mon Dec 13 11:06:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

let u = new URL('http://example.net:8080/path')
u.port = 'randomstring'

How often does it reproduce? Is there a required condition?

always

What is the expected behavior?

{
    "href": "http://example.net:8080/path",
    "host": "example.net:8080",
    "hostname": "example.net",
    "port": "8080"
}

What do you see instead?

{
  href: 'http://example.net/path',
  host: 'example.net',
  hostname: 'example.net',
  port: ''
}

Additional information

https://github.com/web-platform-tests/wpt/blob/master/url/resources/setters_tests.json#L1596

#46860

@meixg meixg added the whatwg-url Issues and PRs related to the WHATWG URL implementation. label Feb 27, 2023
@meixg
Copy link
Member Author

meixg commented Feb 27, 2023

My bad, rebuild and works fine now.

@meixg meixg closed this as completed Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
None yet
Development

No branches or pull requests

1 participant