2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-23 08:36:24 +00:00

ENIGMA2: workaround for unusual behaviour of HttpUtil/CustomGetFileFromURL()

git-svn-id: https://svn.fhem.de/fhem/trunk@4445 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2013-12-22 22:37:26 +00:00
parent e175b2b19f
commit f892669658

View File

@ -1408,8 +1408,7 @@ sub ENIGMA2_SendCommand($$;$) {
. $http_passwd . "@"
. $address . ":"
. $port . "/web/"
. $service . "?"
. $cmd;
. $service;
}
elsif ( defined($http_user) ) {
$URL =
@ -1417,16 +1416,14 @@ sub ENIGMA2_SendCommand($$;$) {
. $http_user . "@"
. $address . ":"
. $port . "/web/"
. $service . "?"
. $cmd;
. $service;
}
else {
$URL =
$http_proto . "://"
. $address . ":"
. $port . "/web/"
. $service . "?"
. $cmd;
. $service;
}
Log3 $name, 5, "ENIGMA2 $name: GET " . urlDecode($URL);
@ -1439,12 +1436,12 @@ sub ENIGMA2_SendCommand($$;$) {
$timeout = 6;
}
# detect a FritzBOX envirnoment
$fritzbox = 1
if ( exists $ENV{CONFIG_PRODUKT_NAME}
&& defined $ENV{CONFIG_PRODUKT_NAME} );
# # detect a FritzBOX envirnoment
# $fritzbox = 1
# if ( exists $ENV{CONFIG_PRODUKT_NAME}
# && defined $ENV{CONFIG_PRODUKT_NAME} );
$response = CustomGetFileFromURL( 0, $URL, $timeout, undef, $fritzbox, 5 );
$response = CustomGetFileFromURL( 0, $URL, $timeout, $cmd, $fritzbox, 5 );
unless ( defined($response) ) {
if (