on 6/21/02 5:54 AM, [EMAIL PROTECTED] purportedly said:

> There has been some discussion on use of LWP::UserAgent to follow
> redirects I have encountered a url that LWP seems to reject. I get the 500
> error, yet on browsers it seems to function perfectly. Here is the URL:
> 
> https://commerce02.procure.com/cpc/cgi-win/cata.exe/e

What is the error message? My LWP doesn't have any issue with that URL.

> This is a secure protocol and I have all SSL modules installed. Yet I cannot
> seem to get to where the redirect is here is my code...
> 
> #!usr/bin/perl
> 
> #use HTTP::Request::Common;
> use LWP::UserAgent;
> use CGI qw(header -no_debug);
> #use HTTP::Cookies;
> 
> $ua = LWP::UserAgent->new;
> $ua->agent('Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101 ');
> $ua->redirect_ok(TRUE);
> 
> my $URL = 'https://commerce02.procure.com/cpc/cgi-win/cata.exe/e';
>
> my $res = LWP::UserAgent->new->request(new HTTP::Request GET => $URL);
> 
> print header;
> print $res->request->url if $res->previous && $res->previous->is_redirect;

Why do you create the user agent object $ua but then not use it? Perhaps LWP
doesn't like your use of indirect referencing. Does
    $ua->request(new HTTP::Request GET => $URL);
give you the same error?

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

Reply via email to