url-normalize
url-normalize copied to clipboard
Fix relative path with a file in between
The correct answer for http://www.foo.com/foo/bar.html/../bar.html is http://www.foo.com/bar.html, but it returns http://www.foo.com/foo/bar.html instead, regarding bar.html as a folder.
I'm not sure we should treat bar.html as not being a folder in this context. It seems logical, and bar.html can indeed be a folder.