garycourt/uri-js

Incorrect resolution with relative paths

epoberezkin opened this issue · 1 comments

uri.resolve('../foo/1', '../bar/2')
Should result in '../bar/2' (node core package does it)
Instead it results in '/bar/2'

URI.js follows the path resolution rules as defined in RFC 3986. In the spec, the algorithm removes any extra .. from the start of a path. I would recommend using the aforementioned Node package if you need this behavior.