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

file state needs clarification #217

Closed
rmisev opened this issue Jan 24, 2017 · 2 comments
Closed

file state needs clarification #217

rmisev opened this issue Jan 24, 2017 · 2 comments

Comments

@rmisev
Copy link
Member

rmisev commented Jan 24, 2017

It's not clear what to do in file state, when c is EOF, "?" or "#" and base is null or base scheme isn't "file". Possible variants:

  1. Continue main loop (11. Keep running the following state machine by switching on state...)
  2. Go to "Otherwise", and because "1.", "2." not meet, go to "3. Set state to path state, and decrease pointer by one"

Consider these URL's::
file:
file:#frag
file:?q=v

(1) variant produces following serialized url's:
file:/// (with empty path list)
file:///frag (fragment converted to the path string)
file:///q=v (query converted to the path string)

(2) variant produces these serialized url's (path with one empty string):
file:///
file:///#frag
file:///?q=v

Although (2) looks better, I think standard points to (1), because bolded "Otherwise" is for c, and not for "if" statements.

So, what do you think?

@annevk
Copy link
Member

annevk commented Jan 24, 2017

I think you're correct that this is wrong. Assuming you meant file:///?q=v in 2 I think those results are what we should be having here (and would match Firefox and Safari TP).

@jasnell
Copy link
Collaborator

jasnell commented Jan 24, 2017

Agree that this certainly looks wrong. The current results here are surprising. +1 to getting this clarified and fixed

annevk added a commit to web-platform-tests/wpt that referenced this issue Feb 2, 2017
See whatwg/url#225 for the URL Standard change
and whatwg/url#217 for the original bug
report and tests.

Thanks @rmisev!
annevk added a commit to web-platform-tests/wpt that referenced this issue Feb 7, 2017
See whatwg/url#225 for the URL Standard change
and whatwg/url#217 for the original bug
report and tests.

Thanks @rmisev!
triple-underscore added a commit to triple-underscore/triple-underscore.github.io that referenced this issue Feb 7, 2017
Editorial: move Windows drive letter to a more logical location
whatwg/url@ac6489f
d1457

File state did not correctly deal with lack of base URL
whatwg/url@698f3e8
5ab7e
Fixes whatwg/url#217
rmisev added a commit to upa-url/upa that referenced this issue May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants