mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
HttpUtils.pm: fix SSL_ERROR (Forum #27565)
git-svn-id: https://svn.fhem.de/fhem/trunk@6716 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1f6ee69951
commit
d6fe70e06d
@ -6,7 +6,7 @@ use strict;
|
||||
use warnings;
|
||||
use IO::Socket::INET;
|
||||
use MIME::Base64;
|
||||
use vars qw($SSL_ERR);
|
||||
use vars qw($SSL_ERROR);
|
||||
|
||||
my %ext2MIMEType= qw{
|
||||
css text/css
|
||||
@ -174,7 +174,10 @@ HttpUtils_Connect2($)
|
||||
if(!$hash->{conn}) {
|
||||
undef $hash->{conn};
|
||||
my $err = $@;
|
||||
$err = $SSL_ERR if(!$err && $hash->{protocol} eq "https");
|
||||
if($hash->{protocol} eq "https") {
|
||||
$err = "" if(!$err);
|
||||
$err .= " ".($SSL_ERROR ? $SSL_ERROR : IO::Socket::SSL::errstr());
|
||||
}
|
||||
return "$hash->{displayurl}: Can't connect(2) to $hash->{addr}: $err";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user