2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 08:11:44 +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 . "@" . $http_passwd . "@"
. $address . ":" . $address . ":"
. $port . "/web/" . $port . "/web/"
. $service . "?" . $service;
. $cmd;
} }
elsif ( defined($http_user) ) { elsif ( defined($http_user) ) {
$URL = $URL =
@ -1417,16 +1416,14 @@ sub ENIGMA2_SendCommand($$;$) {
. $http_user . "@" . $http_user . "@"
. $address . ":" . $address . ":"
. $port . "/web/" . $port . "/web/"
. $service . "?" . $service;
. $cmd;
} }
else { else {
$URL = $URL =
$http_proto . "://" $http_proto . "://"
. $address . ":" . $address . ":"
. $port . "/web/" . $port . "/web/"
. $service . "?" . $service;
. $cmd;
} }
Log3 $name, 5, "ENIGMA2 $name: GET " . urlDecode($URL); Log3 $name, 5, "ENIGMA2 $name: GET " . urlDecode($URL);
@ -1439,12 +1436,12 @@ sub ENIGMA2_SendCommand($$;$) {
$timeout = 6; $timeout = 6;
} }
# detect a FritzBOX envirnoment # # detect a FritzBOX envirnoment
$fritzbox = 1 # $fritzbox = 1
if ( exists $ENV{CONFIG_PRODUKT_NAME} # if ( exists $ENV{CONFIG_PRODUKT_NAME}
&& defined $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) ) { unless ( defined($response) ) {
if ( if (