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

Sub-optimal result in relativeTo with fragment #95

Closed
psranga opened this issue Jun 21, 2013 · 3 comments
Closed

Sub-optimal result in relativeTo with fragment #95

psranga opened this issue Jun 21, 2013 · 3 comments

Comments

@psranga
Copy link

psranga commented Jun 21, 2013

URI("http://www.example.com:8080/dir/file#abcd").relativeTo('http://www.example.com:8080/dir/file').toString()

returns

./file#abcd ('#abcd' would have been better)

The more-optimal result seems to work with absoluteTo:

URI("#abcd").absoluteTo('http://www.example.com:8080/dir/file').toString()

returns

"http://www.example.com:8080/dir/file#abcd"

Great library, btw!

@rodneyrehm
Copy link
Member

Maybe @djcsdy has some ideas, he already did some sweet fixing in #78

@djcsdy
Copy link
Contributor

djcsdy commented Jul 1, 2013

I agree with @psranga, #abcd would be better. #78 doesn’t fix that yet though, it returns file#abcd.

The query component should get similar relativization treatment also IMO.

I do mean to get back and finish my work for #78 at some point, but my workload has been higher than expected lately and my health has been poor – so it’s not going to happen for a little while unfortunately.

@rodneyrehm
Copy link
Member

I've fixed this in master - it will be included in the next release. thank you for your help!

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

No branches or pull requests

3 participants