Mojo::URL Generates Incorrect Relative Paths #193

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

sshaw commented Aug 4, 2011

For example:

$url = Mojo::URL->new('http://kraih.com/a/foo?foo=bar#23');
$url->base->parse('http://kraih.com');  # No trailing slash
say $url->to_rel;

$url = Mojo::URL->new('http://kraih.com/index.html');
say $url->to_rel(Mojo::URL->new('http://kraih.com/a/'));

say 'done...';

Outputs:

foo?foo=bar#23

done

The attached commit would output:

a/foo?foo=bar#23
../index.html
done
Owner

kraih commented Aug 4, 2011

Thanks, applied with a few changes for roundtrip integrity. 51579c8

kraih closed this Aug 4, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment