500 Connect failed: connect: Connection timed out; Connection timed out header ----Content-Type: text/plain Client-Date: Client-Warning: Internal response response --- Connect failed: connect: Connection timed out; Connection timed out at /usr/lib/perl5/site_perl/5.8.8/LWP/Protocol/http.pm line 31 $ #### #!/usr/bin/perl use LWP::UserAgent; use LWP::Simple; use HTTP::Request; use HTTP::Response; use strict; $ENV{PERL_NET_HTTPS_SSL_SOCKET_CLASS}="Net::SSL"; $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; my $ua = new LWP::UserAgent; $ua->timeout(30); $ua->agent(""); $ua->proxy('http', 'http://someproxy.com:80/'); my $h = HTTP::Headers->new(); $h->proxy_authorization_basic('userid','passwordforproxyserver'); #actual server trying to connect to #passing a certificate $ua->ssl_opts( # SSL_ca_file => 'caCertificate.pem', verfiy_hostname => 1, SSL_cert_file => '/home/cert/client_cert.crt', ); # make a https request my $req = HTTP::Request->new('GET', 'https://server.com:443', $h); my $res = $ua->request($req); if ($res->is_success){ print " testing \n " . $res->content; } print "header ----" . $res->headers_as_string; print "response ---" . $res->as_string;