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

Switching from "file" to special scheme when host is empty #270

Closed
rmisev opened this issue Mar 10, 2017 · 2 comments
Closed

Switching from "file" to special scheme when host is empty #270

rmisev opened this issue Mar 10, 2017 · 2 comments

Comments

@rmisev
Copy link
Member

rmisev commented Mar 10, 2017

Sample:

var url = new URL('file:///path');
url.protocol = 'http:';

Current result: http:///path (with empty host); but after re-parse host gets "path" value.

I see two variants how to resolve this issue:

  1. Change host to "localhost"
  2. Or disallow such switch

Related to #259 / #269

@annevk
Copy link
Member

annevk commented Mar 10, 2017

I clearly didn't think hard enough. I will try to add this to the current PR. My tentative plan is to no-op for this case.

annevk added a commit that referenced this issue Mar 10, 2017
@annevk
Copy link
Member

annevk commented Mar 10, 2017

Done, added tests too.

annevk added a commit to web-platform-tests/wpt that referenced this issue Mar 15, 2017
@annevk annevk closed this as completed in 462fdc1 Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants