From 39b6aa7544250690ac27c32cb495360ee7b7db0d Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 3 Oct 2014 06:22:42 +0000 Subject: [PATCH] HttpUtils.pm: report SSL_ERROR (Forum #27565) git-svn-id: https://svn.fhem.de/fhem/trunk@6659 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/HttpUtils.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/HttpUtils.pm b/fhem/FHEM/HttpUtils.pm index 02e8ac125..c01c3877c 100644 --- a/fhem/FHEM/HttpUtils.pm +++ b/fhem/FHEM/HttpUtils.pm @@ -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,