Bug with URI::URL

Rolf Grossmann (grossman@securitas.net)
Thu, 2 Oct 1997 03:21:02 +0200 (MET DST)


Hi,

I have a problem with the URI::URL class, which I believe to be a bug:
When using a relative URL that has an absolute base as the base of
another relative URL, the original base is not honored. The resulting
URL is relative and therefor cannot be represented as an absolute URL.

Here's a short test case:

use LWP; 
use URI::URL; 

$x = new URI::URL "http://www/a/b.html"; 
$y = new URI::URL "c.html", $x; 
$z = new URI::URL "d/bad.html", $y; 
printf("This is libwww-perl-$LWP::VERSION\n%s\n", $z->abs);

The result on my system is:

This is libwww-perl-5.12
/d/bad.html

I'm using perl 5.004 and I've also looked at libwww-perl 5.13, but diff
showed no changes in the URI code.

Bye, Rolf