I seem to have an odd difference in LWP::UserAgent on Ubuntu and CentOS.
On Ubuntu (14.04.1 with LWP::UserAgent 6.05), if I try to connect to a domain with a self-signed certificate, I get this error message with a 500 error code:
"Can't connect to my.test-domain.com:443 (certificate verify failed)"
That's good. I can see exactly what's wrong - a certificate issue. But on CentOS 7 (also with LWP::UserAgent 6.05) I just get this:
"Can't connect to my.test-domain.com:443".
That's less informative, and as such gives me a problem! Does anyone know how I can kick LWP on CentOS to get the "certificate verify failed" message? Here is the script I test with:
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
my $url='https://my.test-domain.com/';
my $browser= LWP::UserAgent->new();
my $tryHEAD=$browser->head($url);
my $responseCode=$tryHEAD->code();
if($tryHEAD->code()==200 ) { print "OK\n"; }
else { print $tryHEAD->code().' '.$tryHEAD->message()."\n"; }