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

"protocol-relative" URLs not working correctly? #73

Closed
psranga opened this issue Apr 2, 2013 · 2 comments
Closed

"protocol-relative" URLs not working correctly? #73

psranga opened this issue Apr 2, 2013 · 2 comments
Labels

Comments

@psranga
Copy link

psranga commented Apr 2, 2013

The output of:

URI("//localhost:8080/a/abcd.txt").absoluteTo("https://localhost:8080/e/g.txt").toString())

should be (AFAIK): https://localhost:8080/a/abcd.txt

instead it is: //localhost:8080/a/abcd.txt

Am I missing something. Would appreciate it if you fixed this. Thanks for a wonderful library!

Protocol-relative URL: http://paulirish.com/2010/the-protocol-relative-url/

Jsfiddle: http://jsfiddle.net/zYPKb/

@rodneyrehm
Copy link
Member

At the moment relativeTo() and absoluteTo() only work on the path part. I'll revisit the Transform References algorithm. you're right, this seems to be a bug.

@psranga
Copy link
Author

psranga commented Apr 2, 2013

Great! Thanks a lot!

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