-
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
"D:\foo" should be parsed as "file:///D:/foo" #271
Comments
For the record, the address bar is out-of-scope. I guess allowing this basically means giving up on single-code-point schemes, indeed. Not sure what the right trade-off is there. On the upside no such schemes are registered at http://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml but nothing is currently prohibiting that either. |
httparchive
Page has changed.
rel="publisher" has no effect for browsers
These are commented out. Possibly there is content such as documentation on CDs that rely on this? Maybe a use counter could help? |
Well, the URL parser should be generally applicable ideally, also beyond browsers. Part of the reason we're doing this is so that non-browsers can still browse the web. |
Sure, I was just trying to find out if there were strong compat reasons for browsers to behave one way or the other for such URLs. I think there isn't, for publicly-accessible web content at least. |
Actually, we could maybe support this by branching on the backslash, which is normally non-conforming and doesn't occur in the examples above. |
Oops, the query only looked for forward slash. New query. Also removed the
22 rows. https://gist.github.com/zcorpan/98a61be4877858d3de18c19d8939a3be |
Looks mostly like errors (and stuff that won't work since we don't want http -> file to do anything but network error), but also all of those with backslash expect the behavior OP asks for I think. |
I confirmed that this is a quirk IE6+/Chrome (on Windows only) have. They do it for both Thoughts on only adopting this when a backslash is used? Or should we add a platform-specific quirk here similar to https://w3c.github.io/FileAPI/#convert-line-endings-to-native and make single-scheme URLs impossible forever on that platform? |
I'm -1 on platform-specific behavior (seems especially bad in contexts like HTTP servers and proxies). I'm neutral on treating backslash specially vs. just treating all single-letter schemes as drive letters. I'm +1 on addressing this in general. It would be great if full Windows file paths can be parsed as URLs as simply as passing them to the URL constructor. |
https://quuz.org/url/liveview.html#D:/foo Edge and Chrome on Windows at least parse this as a file URL, which I think is much more friendly. Firefox does not, but has some special logic so that when you enter
D:\foo
in the URL bar, it translates it tofile:///D:/foo
.They also parse https://quuz.org/url/liveview.html#D:b/foo as a file URL, so it's not about the path name starting with /... maybe they treat all single-character schemes this way?
Discovered in nodejs/node-eps#51 (comment) by @jkrems
The text was updated successfully, but these errors were encountered: