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

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

Comments

Projects
None yet
2 participants

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/

Owner

rodneyrehm commented Apr 2, 2013

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.

rodneyrehm closed this in 4a85824 Apr 2, 2013

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