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

I ran another batch of examples. An attempt to summarize:

- Safari and Firefox behave according to the RFC and don't collapse slashes in file URLs. 
- Firefox always sets the host to the empty string.
- Chrome/Mac does remove the leading empty path segments.
  - However, it does parse e.g. `//one` as having a host.
- Both Edge and Chrome/Windows ignore slashes after `file:///` and interpret the first nonempty path segment as the host. 
  - However, `file://one` and `file:///one` are parsed as just that. 

Given `file:///` as a base URL:

| Input              | Edge                   | Chrome/Windows    | Chrome/Mac         | Safari             | Firefox            |
| ------------------ | ---------------------- | ----------------- | ------------------ | ------------------ | ------------------ |
| `file:///one/two`  | `file:///one/two`      | `file:///one/two` | `file:///one/two`  | `file:///one/two`  | `file:///one/two`  |
| `file:////one/two` | `file://one/two`       | `file://one/two`  | `file:///one/two`  | `file:////one/two` | `file:////one/two` |
| `//one/two`        | `file://one/two`       | `file://one/two`  | `file://one/two`   | `file://one/two`   | `file:///two`      |
| `///one/two`       | `file:///.///one/two`  | `file:///one/two` | `file:///one/two`  | `file:///one/two`  | `file:///one/two`  |
| `////one/two`      | `file:///.////one/two` | `file://one/two`  | `file:///one/two`  | `file:////one/two` | `file:////one/two` |

Tested on Edge 17 and 18 and Chrome 71 on Windows (via browserstack), Safari 13, Chrome 81 and Firefox 76 on Mac. 


-- 
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#issuecomment-631535857

Received on Wednesday, 20 May 2020 15:09:37 UTC