This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I'm trying to implement the URL parsing algorithm, but it seems to run into trouble in the following situation, unless I'm just misunderstanding. * Parsing input "file:anything" with no state override and no base URL. * After ':' is found in the scheme state, step 2.3 switches to relative state. * The next thing that happens, as far as I can see, is that the relative state overwrites the 'file' scheme with the base URL's scheme. It looks like this would always break when, e.g., parsing a "file:" URL in a page accessed via an "http:" URL, and I don't know what is supposed to happen if a base URL isn't provided.
Well if a base URL is not provided the scheme cannot be "file". But yes, it seems we should special case "file" in the /relative state/.
https://github.com/whatwg/url/commit/20ac84d65bfd913121aec8c257bf3c9cd6256b50