Re: Draft of announcement message

Martijn Koster (m.koster@nexor.co.uk)
Mon, 05 Jun 1995 08:36:40 +0100


In message <01HRBRCI7E848X0ACT@Gems.VCU.EDU>, "J.E. Fritz" writes:

> There is a small bug in URI::URL 2.9:  A relative path made absolute by abs
> lacks a leading slash character. E.g.,  the program:
> 
>    use URI::URL;
>    my $base= new URI::URL 'http://host/directory/file';
>    my $relative= new URI::URL 'file', $base;
>    my $result= $relative->abs;
>    print "Base path: ",$base->path,"\n";
>    print "Result path: ",$result->path,"\n";
> 
> prints:
> 
>    Base path: /directory/file
>    Result path: directory/file

That calls for another test in the self-test. I've added

    # bug found in 1.9 by "J.E. Fritz" <FRITZ@gems.vcu.edu>

    my $base = new URI::URL 'http://host/directory/file';
    my $relative = new URI::URL 'file', $base;
    my $result = $relative->abs;
    my ($a, $b) = ($base->path, $result->path);
	die "'$a' and '$b' should be the same" unless $a eq $b;

    print "absolute test ok\n";

> Here's a diff:

applying that diff fails the self test elsewhere (am I glad
we've got them :-), try perl -w URI/URL.pm

We need to trace through and find exactly where what goes wrong. I'll see
if I can fix it properly tomorrow evening. Let me know if you beat me
to it.

-- Martijn
__________
Internet: m.koster@nexor.co.uk
X-400: C=GB; A= ; P=Nexor; O=Nexor; S=koster; I=M
WWW: http://web.nexor.co.uk/mak/mak.html