Re: [whatwg/url] Needs to ignore repeated slashes in file URL (#232)

Could someone explain to me the reasoning behind this decision? 

I believe that it was motivated by the desire to interpret `file:////host` as `file://host`, making file URLs and other 'special' URLs more alike. But the result is that now paths of file URLs are different from paths of other special URLs, and less expressive. 

I've been working on an URL parser that follows the WhatWG behaviour but separates the parsing and the normalization phases. In that light, the following cases from the web platform tests are especially confusing. 

* `/..//localhost//pig` against `file://lion/` resolves to `file://lion/localhost//pig` rather than `file://lion//localhost//pig`. 
* `file://localhost//a//../..//` resolves to `file:///` rather than `file:////`

Note that `/..//localhost//pig` against `http://lion/` resolves to `http://lion//localhost//pig`
(and `http://localhost//a//../..//` resolves to `http://localhost///`). 

Why would you make this trade-off? Is there a motivation that I am missing?

Thank you,


-- 
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/232#issuecomment-406369990

Received on Thursday, 19 July 2018 18:23:21 UTC