[whatwg/url] Are drive letters always invalid? (#612)

The Writing section suggests that drive letters are allowed in file URLs only if they do not have a host. 
This is reflected in the parser (the file-slash state does not issue a validation warning on a drive letter, the other states do).
However, step 5.1 in the scheme state ensures that hostless file URLs are always invalid, so it is out of sync with the Writing section, and it suggests there cannot be a valid file URL with a drive letter. 

Maybe the idea is that e.g. `file:/c:/etc/` has a drive, whereas `file:c:/etc/`, `file://c:/etc/` and `file:///c:/etc/` do not. That makes sense as a way to disambiguate drive letters from path components that 'look like' drive letters. But the parser/resolver does treat the `c:` part as a drive letter in all of them. 




-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/612

Received on Saturday, 5 June 2021 17:13:26 UTC