webspecs / url

The URL specification
https://specs.webplatform.org/url/webspecs/develop/
Other
21 stars 9 forks source link

Remove file-like-scheme? #7

Closed domenic closed 9 years ago

domenic commented 9 years ago

It seems you'd gain a decent amount of simplicity by just inlining the string "file" in the appropriate places. As-is, it feels like premature generalization.

masinter commented 9 years ago

is "ftp:" a file-like scheme?

domenic commented 9 years ago

Nope:

rubys commented 9 years ago

@dominic: be aware that one of those two links is likely to be short-lived. :-)

(put another way, I agree with this request, and plan to address it shortly)

masinter commented 9 years ago

I meant "shouldn't ftp be a file-like scheme"? Such that the "generalization" isn't "premature", if there's possibly other cases?

At least,

ftp:\ftp.rfc-editor.org\in-notes\rfc1738.txt turns into ftp://ftp.rfc-editor.org/in-notes/rfc1738.txt

when typed into address bar in Chrome and IE11

i could make some test cases, I suppose, if it was clear where to put them.

domenic commented 9 years ago

If that's the criteria, then http is also a file-like scheme. typing

http:\ftp.rfc-editor.org\in-notes\rfc1738.txt

turns into

http://ftp.rfc-editor.org/in-notes/rfc1738.txt

before being redirected to

https://www.rfc-editor.org/in-notes/rfc1738.txt

rubys commented 9 years ago

@masinter:

i could make some test cases, I suppose, if it was clear where to put them.

The place to put them is urltestdata.txt. web-platform-tests accepts [pull requests](https://github.com/w3c/web-platform-tests/pulls pull requests).

The format is a bit... arcane. The URL Test Results page may help not only in deciphering the format, but also to see comparative results with a variety of user agents.