HttpUtils.pm: fix SSL_ERROR (Forum #27565)

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@6716 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2014-10-09 04:56:48 +00:00
parent 5a92ef8cc8
commit e4dbc33f42

View File

@@ -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";
}