Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.relativeTo() requires trailing slash on .. path segments #224

Closed
bradleyayers opened this issue Jun 29, 2015 · 2 comments
Closed

.relativeTo() requires trailing slash on .. path segments #224

bradleyayers opened this issue Jun 29, 2015 · 2 comments
Labels

Comments

@bradleyayers
Copy link

I'm not sure if this adheres to the URI spec or not, but this behaviour was surprising to me:

> URI("http://example.com/foo/..").relativeTo("http://example.com/foo/").toString()
""
> URI("http://example.com/foo/../").relativeTo("http://example.com/foo/").toString()
"../"

What are your thoughts here?

@rodneyrehm
Copy link
Member

The problem was located in .normalizePath() returning "" (empty string) for "/foo/.." but "/" for "/foo/../". This issue is resolved and pushed to master. Thank you!

@bradleyayers
Copy link
Author

Once again I'm very impressed with your responsiveness. Thank-you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants