-
Notifications
You must be signed in to change notification settings - Fork 139
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
Drive letters get duplicated when resolving Windows file: URL with base #303
Comments
Windows drive letters are somewhat magical (and act like hosts) so that's somewhat to be expected. |
Why do they act like hosts? A file: URI can have a host before the path, the path starts with a leading slash just like on other OS. It's just like a mounted drive on Linux. The drive letter definitely is not shown as a host in any implementation I tested: new URL('/c:/foo/bar', 'file:///c:/baz/qux').host
'' Is this behaviour defined in the current spec? |
Act like host doesn't mean exposed as one. It just means that when resolving URLs they act like a base.
|
I think a drive letter must act like "host" in the input as well. I.e. if input has a drive letter, then don't copy the drive letter from base. Because the same is done with hosts: if input contains a host, then host isn't copied from the base. So I think @felixfbecker is right. It looks like spec. bug. |
Tests: web-platform-tests/wpt#7326. Fixes #303. Closes #308.
It seems like it's impossible to resolve a Windows file:/// URI with a base.
Expected (as implemented Chrome):
Actual (as implemented in jsdom/whatwg-url, NodeJS 7, Edge):
The text was updated successfully, but these errors were encountered: