From: Michael Gernoth Date: Fri, 30 Apr 2021 10:05:43 +0000 (+0200) Subject: supermicro-kvm: handle redirects to https X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/commitdiff_plain/refs/heads/master?hp=2747626560b46ae7c8d3bf167f20549e8202c2e3 supermicro-kvm: handle redirects to https --- diff --git a/supermicro-kvm.pl b/supermicro-kvm.pl index 93e91a0..3339289 100755 --- a/supermicro-kvm.pl +++ b/supermicro-kvm.pl @@ -2,12 +2,16 @@ use LWP::UserAgent; use LWP::ConnCache; +use IO::Socket::SSL; use XML::Simple; use Data::Dumper; use File::Temp; -my $ua = LWP::UserAgent->new(cookie_jar => {}); +my $ua = LWP::UserAgent->new(cookie_jar => {}, + ssl_opts => {verify_hostname => 0, + SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE}); $ua->default_header('Referer' => 'http://localhost'); +push @{ $ua->requests_redirectable }, 'POST'; sub login { my $url = shift;