Absolutizing URIs
gcarvell@bpd.treas.gov
Wed, 14 Jul 1999 12:49:02 -0700
I'm having trouble making an absolute URI from an existing URI object
and a relative link. A link to an in-page anchor such as this '#foo?'
can be absolutized with no problems, but a link like this '#foo?'
drops the parent URI's filename when made absolute.
This works as expected:
$a = URI->new_abs('#foo', 'http://www.bar.com/file.html');
-> http://www.bar.com/file.html#foo
But this drops the filename from the result URI:
$b = URI->new_abs('#foo?', 'http://www.bar.com/file.html');
-> http://www.bar.com/#foo?
Is this a bug, or just something obvious I've missed? (P.S. and don't
ask *why* people here have to make their anchors full sentences ending
in question marks...)
Thanks,
Gary