Re: [whatwg/url] Should file path <-> file URL handling be standardized? (#621)

> Firefox (assuming servo/rust-url is used?)

I don't believe Firefox uses servo/rust-url; there's a very old bug about them switching to it, but from what I understand it isn't running in production, since I never saw the expected big jump in wpt.fyi pass rate.

The bugs are a bit confusing though and imply some Rust-based URL parser has landed somewhere in Firefox, perhaps behind a flag. (But maybe was then reverted?) See https://bugzilla.mozilla.org/show_bug.cgi?id=1318426 and its relatives.

---

Overall, not speaking as an editor, I think this would be cool. However, it would be a notable expansion of the spec's current scope. And I'd be surprised if it's a high priority for any browser engineers, since `file:` URLs aren't really part of the web.

I suspect an effort like this might have the best chance of success if it was done by a really interested community, probably server-focused instead of browser-focused. I.e. you all could come up with a spec and test suite that reflects what you think of as the very best behavior that takes into account all of these subtleties you mention, without prioritizing browser interop or compat. Then if that effort is successful it might be worth taking it back to browsers and trying to get it implemented there, or taking it back to the URL Standard and trying to include it as a section here. But you could derive most of the value from such an effort that just tries to standardize across non-browser software.

Note that this is all related to, but not quite the same as, the question of how servers should map HTTP(S) URL path components to file paths when doing static file serving. I.e. it also needs to consider percent-decoding, slash canonicalization, and the like. That question has come up on the issue tracker a few times, with similar responses of "not really in scope for now". It might be cool if whatever you come up with for `file:` URLs could be applied to give a similar algorithm for HTTP(S) URL paths.

I'm definitely curious what @annevk and other community members think.

-- 
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/621#issuecomment-879349206

Received on Tuesday, 13 July 2021 19:39:03 UTC