[whatwg/url] Review slashes after file:/// and file path normalization (#405)

The current standard asks to remove leading empty directories from file paths. 
This seems to have been motivated by the desire to ignore slashes after `file:///` whilst avoiding reparsing issues. However,

- It introduces new behavior that has no precedence in browsers. 
- It is inconsistent with path normalization of other special URLs, and less expressive.  

Examples, tested in Chrome canary, Safari preview and Firefox nightly:

| Input | Firefox and Safari | Chrome | Currently specified |
| ----- | ------------------ | ------ | ------------------- |
| `/..//localhost//pig` against `file://lion/` | `file:////localhost//pig` | `file://lion//localhost//pig` | `file://lion/localhost//pig` |
| `file://localhost//a//../..//` | `file://///` | `file://localhost///` | `file:///` |
| `file://localhost////foo` | `file://////foo` | `file://localhost////foo` | `file:///foo` |
| `file:////foo` | `file:////foo` | `file:///foo` | `file:///foo` |

Notes:
- The spec agrees only with Chrome (Edge?), only in the fourth case. 
- Browsers agree on the pathName except for the fourth case. 
(Dropping the host in the first seems off). 
- Firefox and Safari do not ignore slashes and thereby avoid reparsing issues. 
- Chrome (Edge?) only ignores slashes immediately following `file:///` and keeps `localhost`, avoiding a reparsing issue. 

-- 
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/405

Received on Monday, 23 July 2018 13:54:59 UTC