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

More tests for file URL Window drive letter quirk #4382

Merged
merged 4 commits into from
Jan 11, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions url/urltestdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -4652,7 +4652,7 @@
{
"input": "/",
"base": "file:///C:/a/b",
"href": "file:///",
"href": "file:///C:/",
"protocol": "file:",
"username": "",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pathname should be "/C:/" not "/"

"password": "",
Expand All @@ -4666,7 +4666,7 @@
{
"input": "//d:",
"base": "file:///C:/a/b",
"href": "file://d:/",
"href": "file:///d:",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should end in a slash, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://url.spec.whatwg.org/#file-state "/"
https://url.spec.whatwg.org/#file-slash-state "/"
https://url.spec.whatwg.org/#file-host-state "d:" appended to buffer, then EOF. Buffer is a Windows drive letter.
https://url.spec.whatwg.org/#path-state step 1.4.2 appends buffer to path, without adding a trailing slash.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems correct, but then pathname wouldn't end in a "/" either. It's also not entirely clear to me that is the desired outcome.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pathname should be "/d:" not "/d:/"

"protocol": "file:",
"username": "",
"password": "",
Expand All @@ -4680,7 +4680,7 @@
{
"input": "//d:/..",
"base": "file:///C:/a/b",
"href": "file://d:/",
"href": "file:///d:/",
"protocol": "file:",
"username": "",
"password": "",
Expand Down