"Feng, James" <[EMAIL PROTECTED]> writes:

> I used lwp to get a https site and I got " an error Error:500 read
> failed:". According to the error code 500, it is a internal server error
> however I can get the site by using browser. I have Crypt::SSLeay
> installed.

You should tell us:
  - what site are you trying to access (URL)
  - what version of LWP are you using
  - what version of Crypt::SSLeay are you using
  - what version of perl are you using (perl -V)
  - what OS platform are you running on
  - possibly other relevant information that makes it possible
    for others to experience your problem

> Here is my code and please help.

This code snippet does not reveal anything.

> sub Obj_lwp_https
> {
>         my ($curl) = @_;
> 
>         use LWP::UserAgent;
> 
>         my $ua = new LWP::UserAgent;
> 
>         $ua -> agent("$0/0.1 " . $ua->agent);
> 
>       my $req = new HTTP::Request 'GET' => $curl;
> 
>         $req -> header('Accept' => 'text/html');
> 
>         my $res = $ua->request($req);
> 
>         if ($res->is_success)
>         {
>                 return $res->content;
>         }
>         else
>         {
>                 return "Error:" . $res->status_line . "\n";
>         }
> }

Regards,
Gisle

Reply via email to