Re: [whatwg/url] Windows drive letter uppercasing (#515)

In what situations _does_ it capitalise drive letters? Wouldn’t capitalising drive letters at the start incur the same problem?

There may be another solution that aligns well with chromium’s implementation.

* Drive letters would be recognised only at the start of the path. They can be normalised to upper case. (This is what chromium did till at least recently). 

* The troublesome `file:///foo/../s:` and `file:///./s:` can be canonicalised to the latter.  The `./` prefix then ensures that the `s:` part is interpreted as an ordinary path component and not as a drive letter. 

  If that’s confusing to the eye then the colon can (also) be percent encoded.

Nb. There are only two test cases in WPT that disagree with that approach.

I don’t think it would be very hard to implement in the standard’s parser, nor in chromium, from what I’ve seen. 

However, I do not know how `\foo\..\S:\` as a file path is interpreted on windows. If the `S:` part is interpreted as the drive letter, then it makes sense to do that in the standard as wel. 


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/515#issuecomment-1384425904

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/515/1384425904@github.com>

Received on Monday, 16 January 2023 18:33:00 UTC