Issue metadata
Sign in to add a comment
|
URL API does not parse out hostnames as specced
Reported by
felixbec...@gmail.com,
Nov 6
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Steps to reproduce the problem:
`new URL('ssh://github.com/test/repo.git')`
What is the expected behavior?
The URL object should have `hostname` "github.com" and `pathname "/test/repo.git" according to the spec.
What went wrong?
The URL object has `hostname` "" and `pathname` "//github.com/test/repo.git".
Did this work before? No
Does this work in other browsers? Yes
Chrome version: 70.0.3538.77 Channel: stable
OS Version: OS X 10.14.0
Flash Version:
Repro website: https://felixfbecker.github.io/whatwg-url-custom-host-repro/
Filed on https://github.com/webcompat/web-bugs/issues/19792
Specific test case added in https://github.com/web-platform-tests/wpt/pull/13516 (although also already covered in existing tests)
Chrome and Firefox both misbehave, while Edge, Safari, Node and whatwg-url behave spec-compliant.
This makes the URL API unreliable to use for generic URL parsing and always requires us to polyfill it (which is pretty big).
,
Nov 6
,
Nov 7
,
Nov 8
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by foolip@chromium.org
, Nov 6