S
Sebastian Bauer
Hi,
I try to wirte a script that downloads images from a webpage. I use
my $uagent = LWP::UserAgent->new();
my $request = HTTP::Request->new(GET => "$url");
my $result = $uagent->request($request);
but the problem is that - even if $url does not contain a trailing slash -
some a slash is added at the end. This behaviour keeps me from downloading
the file because the download is refused this way. I think it must be this
slash, if i try to get the file via Mozilla (without the slash) it works,
with Mozilla with the slash it does not.
It would be great if anyone could help me out and tell me how to get rid of
the slash
Thx, Sebastian
I try to wirte a script that downloads images from a webpage. I use
my $uagent = LWP::UserAgent->new();
my $request = HTTP::Request->new(GET => "$url");
my $result = $uagent->request($request);
but the problem is that - even if $url does not contain a trailing slash -
some a slash is added at the end. This behaviour keeps me from downloading
the file because the download is refused this way. I think it must be this
slash, if i try to get the file via Mozilla (without the slash) it works,
with Mozilla with the slash it does not.
It would be great if anyone could help me out and tell me how to get rid of
the slash
Thx, Sebastian