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

protocol setter changing between special and non-special schemes #104

Closed
SimonSapin opened this issue Mar 23, 2016 · 3 comments
Closed

protocol setter changing between special and non-special schemes #104

SimonSapin opened this issue Mar 23, 2016 · 3 comments

Comments

@SimonSapin
Copy link
Contributor

In https://url.spec.whatwg.org/#scheme-start-state

If state override is given, run these subsubsteps:

  • If url’s scheme is a special scheme and buffer is not, terminate this algorithm.
  • If url’s scheme is not a special scheme and buffer is, terminate this algorithm.

I think this is a remnant from before b266a43 (before URLs with unknown/non-special schemes could be relative) and is now more strict than necessary. I suggest changing it to:

If state override is given, url’s non-relative flag is set, and buffer is a special scheme, terminate this algorithm.

In other words, the only relevant invariant left to maintain is that an URL can not be both special and non-relative.

domenic pushed a commit to web-platform-tests/wpt that referenced this issue May 11, 2016
See #2830 (comment).

This can be un-reverted when the following are fixed in the spec:

- whatwg/url#113
- whatwg/url#104
arronei pushed a commit to arronei/web-platform-tests that referenced this issue Jun 14, 2016
See web-platform-tests#2830 (comment).

This can be un-reverted when the following are fixed in the spec:

- whatwg/url#113
- whatwg/url#104
ivanzr pushed a commit to ivanzr/web-platform-tests that referenced this issue Jun 29, 2016
See web-platform-tests#2830 (comment).

This can be un-reverted when the following are fixed in the spec:

- whatwg/url#113
- whatwg/url#104
@annevk
Copy link
Member

annevk commented Oct 28, 2016

I think there's another problem here specifically for Location objects. That is the leftover of #61.

@annevk
Copy link
Member

annevk commented Jan 3, 2017

@SimonSapin I actually think this restriction is still good or we'd have to add many more special cases. Since non-special schemes can also have an empty host and with #185 will have special parsing rules for hosts. It seems good to keep them separate.

@annevk
Copy link
Member

annevk commented Jan 3, 2017

My tentative plan is to close this issue through tests, if any need to be added.

annevk added a commit to web-platform-tests/wpt that referenced this issue Jan 3, 2017
jgraham pushed a commit to web-platform-tests/wpt that referenced this issue Jan 3, 2017
* URL: protocol setter and special URLs

Closes whatwg/url#104.
joyeecheung added a commit to joyeecheung/node that referenced this issue Feb 2, 2017
italoacasas pushed a commit to nodejs/node that referenced this issue Feb 3, 2017
* attributon of WPT in url-setter-tests
* add WPT test utilities
* synchronize WPT URLSearchParams tests
* synchronize WPT url tests
* split whatwg-url-inspect test
* port historical url tests from WPT
* protocol setter and special URLs

Refs: web-platform-tests/wpt#4413
Refs: whatwg/url#104
PR-URL: #11079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
TimothyGu pushed a commit to TimothyGu/node that referenced this issue Feb 18, 2017
* attributon of WPT in url-setter-tests
* add WPT test utilities
* synchronize WPT URLSearchParams tests
* synchronize WPT url tests
* split whatwg-url-inspect test
* port historical url tests from WPT
* protocol setter and special URLs

Refs: web-platform-tests/wpt#4413
Refs: whatwg/url#104
Backport-of: nodejs#11079
italoacasas pushed a commit to italoacasas/node that referenced this issue Feb 20, 2017
* attributon of WPT in url-setter-tests
* add WPT test utilities
* synchronize WPT URLSearchParams tests
* synchronize WPT url tests
* split whatwg-url-inspect test
* port historical url tests from WPT
* protocol setter and special URLs

Refs: web-platform-tests/wpt#4413
Refs: whatwg/url#104
Backport-of: nodejs#11079
italoacasas pushed a commit to nodejs/node that referenced this issue Feb 22, 2017
* attributon of WPT in url-setter-tests
* add WPT test utilities
* synchronize WPT URLSearchParams tests
* synchronize WPT url tests
* split whatwg-url-inspect test
* port historical url tests from WPT
* protocol setter and special URLs

Refs: web-platform-tests/wpt#4413
Refs: whatwg/url#104
Backport-of: #11079
krydos pushed a commit to krydos/node that referenced this issue Feb 25, 2017
* attributon of WPT in url-setter-tests
* add WPT test utilities
* synchronize WPT URLSearchParams tests
* synchronize WPT url tests
* split whatwg-url-inspect test
* port historical url tests from WPT
* protocol setter and special URLs

Refs: web-platform-tests/wpt#4413
Refs: whatwg/url#104
PR-URL: nodejs#11079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants