[whatwg/url] Single and double dot segments in paths cannot be represented – Premature decoding of %2e character sequences. (#281)

It is currently impossible to represent URLs (note: URLs,  not URL-strings) that have paths that contain single or double dot segments, making it impossible, for example, to address files or directories named `.` or `..`. 

Example: According to the specification, the URL-string `http://asd/efg/%2e%2e/` should resolve to `http://asd/`. The `/%2e%2e/` part is considered equivalent to `/../` and is hence interpreted as a move to the parent directory. The same holds for`http://asd/efg/.%2e/`. 

I propose to change this on account of the following:

* Currently (at least) Safari does not shorten the url, and maintains the `/%2e%2e/` segment in the path. As long as there is no consensus, we may be still able to change this!

* It should be possible to represent URLs (not URL-strings) with single and double dot path components as URL-strings. 

* It is not elegant and looks like a standardization of buggy parsing/ resolution algorithms. I cannot help but see this as a 'premature decoding' of the `%2e` sequences. 

I see `.` and `..` sequences in URL-strings as syntactic constructs, similar to the `?`, `#` and `/` characters. URLs with path components that contain one of the `?`, `#` or `/` characters can be represented by percent encoding them, e.g. by using `%3f`, `%23`, or `%2f`. Why not allow the same here – while we still can?

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

Received on Friday, 24 March 2017 17:08:54 UTC