mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-14 05:46:35 +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:
parent
80415c6071
commit
39b6aa7544
@ -6,6 +6,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use IO::Socket::INET;
|
use IO::Socket::INET;
|
||||||
use MIME::Base64;
|
use MIME::Base64;
|
||||||
|
use vars qw($SSL_ERR);
|
||||||
|
|
||||||
my %ext2MIMEType= qw{
|
my %ext2MIMEType= qw{
|
||||||
css text/css
|
css text/css
|
||||||
@ -167,9 +168,12 @@ HttpUtils_Connect2($)
|
|||||||
|| undef $hash->{conn};
|
|| undef $hash->{conn};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$hash->{conn}) {
|
if(!$hash->{conn}) {
|
||||||
undef $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;
|
my $data;
|
||||||
@ -356,6 +360,7 @@ sub
|
|||||||
CustomGetFileFromURL($$@)
|
CustomGetFileFromURL($$@)
|
||||||
{
|
{
|
||||||
my ($hideurl, $url, $timeout, $data, $noshutdown, $loglevel) = @_;
|
my ($hideurl, $url, $timeout, $data, $noshutdown, $loglevel) = @_;
|
||||||
|
$loglevel = 4 if(!defined($loglevel));
|
||||||
my $hash = { hideurl => $hideurl,
|
my $hash = { hideurl => $hideurl,
|
||||||
url => $url,
|
url => $url,
|
||||||
timeout => $timeout,
|
timeout => $timeout,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user