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

Reply via email to