2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

HttpUtils.pm: report SSL_ERROR (Forum #27565)

git-svn-id: https://svn.fhem.de/fhem/trunk@6659 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-10-03 06:22:42 +00:00
parent 80415c6071
commit 39b6aa7544

View File

@ -6,6 +6,7 @@ use strict;
use warnings;
use IO::Socket::INET;
use MIME::Base64;
use vars qw($SSL_ERR);
my %ext2MIMEType= qw{
css text/css
@ -167,9 +168,12 @@ HttpUtils_Connect2($)
|| undef $hash->{conn};
}
}
if(!$hash->{conn}) {
undef $hash->{conn};
return "$hash->{displayurl}: Can't connect to $hash->{addr}: $@";
my $err = $@;
$err = "$SSL_ERR" if(!$err && $hash->{protocol} eq "https");
return "$hash->{displayurl}: Can't connect to $hash->{addr}: $err";
}
my $data;
@ -356,6 +360,7 @@ sub
CustomGetFileFromURL($$@)
{
my ($hideurl, $url, $timeout, $data, $noshutdown, $loglevel) = @_;
$loglevel = 4 if(!defined($loglevel));
my $hash = { hideurl => $hideurl,
url => $url,
timeout => $timeout,