Hi,
The default install of apache uses index.html.en.
So if you request for http://localhost/, the server
hands out index.html.en.
If you use lwp against such as a server, the
base method gives nothing but index.html.en,
which is wrong:
$ cat foo.pl
#!/usr/bin/perl
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
my $req = new HTTP::Request 'GET',"http://localhost/";
my $res = $ua->request($req);
if ($res->is_success) {
my $base=$res->base;
print "base url is =",$base->url,"\n";
print "Content-Location=",$res->header('Content-Location'),"\n";
} else {
print "Error: " . $res->code . "\n";
}
$ foo.pl
base url is =index.html.en
Content-Location=index.html.en
The source of the problem is because Content-Location uses
relative url.
Is this a known bug or feature?
Thanks
Richard