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 #226

Closed
bradleyayers opened this issue Jun 30, 2015 · 3 comments
Closed

.relativeTo() requires trailing slash #226

bradleyayers opened this issue Jun 30, 2015 · 3 comments
Labels

Comments

@bradleyayers
Copy link

This seems related to #224, but is a little different:

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

I expected either . or ./.

@rodneyrehm
Copy link
Member

Are you sure the order correct? URI(target).relativeTo(base) - you seem to be running URI(base).relativeTo(target). Anyway, I agree that in this particular case the result should be ./

@bradleyayers
Copy link
Author

Yeah it's the correct order, I admit the first example is quite weird, but the second is likely more common. I stumbled on this case during some testing.

rodneyrehm added a commit that referenced this issue Jun 30, 2015
@rodneyrehm
Copy link
Member

fixed in master

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