I too have gotten the erro that Luke describes. Here is the output from
perl -W
when I try the same thing:
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::simple_request: GET https://www.xxx.com/
LWP::UserAgent::_need_proxy: Not proxied
HTTP::Cookies::add_cookie_header: Checking www.xxx.com for cookies
HTTP::Cookies::add_cookie_header: Checking .xxx.com for cookies
LWP::Protocol::http::request: ()
Argument "SSL negotiation failed" isn't numeric in scalar assignment at
/usr/local/lib/perl5/5.6.0/IO/Socket/INET.pm line 90.
Use of uninitialized value in hash element at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/Net/SSL.pm line 53.
LWP::UserAgent::request: Simple response: Internal Server Error
Query failed. 500 Can't connect to www.xxx.com:443 (Timeout)
I still haven't figured out what the problem is--perhaps this extra
information
will shed some light?
Andrew
Gisle Aas wrote:
>
> Luke Butcher <[EMAIL PROTECTED]> writes:
>
> > I am trying to write a simple script to retrieve a secure page via HTTPS.
> >
> > The guts of it are:
> >
> > $url = "https://mysite.com"
> > $ua = new LWP::UserAgent;
> > $req = new HTTP::Request GET => $url
> >
> > $response = $ua->request($req);
> >
> > It keeps returning: (via $response->status_line, $response->as_html also
> > returns similar).
> > 500 Can't Connect to mysite.com:443 (Timeout)
> ^.... did you actually get an upper case "C" here???
> >
> > So I did some poking, tried hacking up the timeout to 999 - No joy.
> > So I went looking into the LWP::Protocol packages and did some tracing.
> >
> > It seems UserAgent.pm nicely determines we are using https and calls
> > LWP::Protocol::https.pm with a request method but https lacks a request
> > method??!?!!?!?
>
> That's right. It relies on the inherited request() method of http,
> but this method calls $self->_new_socket() which will pick up the
> https version.
>
> > Further info: If I point the script to a HTTP:// site all works smashingly.
> > All requires are properly installed (no error messages and debugging shows
> > it is correctly stepping into Net:SSL). The box I'm trying to connect to is
> > IIS, if it makes a difference.
>
> Can you get SSLeay to connect directly to port 443 on mysite.com?
>
> Regards,
> Gisle
--
Andrew C. M. McClintock Senior Unix Systems Administrator
[EMAIL PROTECTED] [EMAIL PROTECTED]
Cable & Wireless USA Phone: (703) 292-2244