From d8951d4cc8e4a9bf88dfbb6a7838a331ddc4f2fb Mon Sep 17 00:00:00 2001 From: jpawlowski Date: Mon, 20 Mar 2017 17:07:47 +0000 Subject: [PATCH] 70_ENIGMA2: add some HttpUtils_NonblockingGet() settings git-svn-id: https://svn.fhem.de/fhem/trunk@13751 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/70_ENIGMA2.pm | 57 ++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/fhem/FHEM/70_ENIGMA2.pm b/fhem/FHEM/70_ENIGMA2.pm index 82d1fdea4..7e69a0e72 100644 --- a/fhem/FHEM/70_ENIGMA2.pm +++ b/fhem/FHEM/70_ENIGMA2.pm @@ -968,16 +968,26 @@ sub ENIGMA2_SendCommand($$;$$) { HttpUtils_NonblockingGet( { - url => $URL, - timeout => $timeout, - noshutdown => $http_noshutdown, - data => undef, - hash => $hash, - service => $service, - cmd => $cmd, - type => $type, - callback => \&ENIGMA2_ReceiveCommand, + url => $URL, + timeout => $timeout, + noshutdown => $http_noshutdown, + data => undef, + hash => $hash, + service => $service, + cmd => $cmd, + type => $type, + callback => \&ENIGMA2_ReceiveCommand, httpversion => "1.1", + loglevel => AttrVal( $name, "httpLoglevel", 4 ), + header => { + Agent => 'FHEM-ENIGMA2/1.0.0', + 'User-Agent' => 'FHEM-ENIGMA2/1.0.0', + Accept => 'text/xml;charset=UTF-8', + 'Accept-Charset' => 'UTF-8', + }, + sslargs => { + SSL_verify_mode => 0, + }, } ); @@ -995,15 +1005,26 @@ sub ENIGMA2_SendCommand($$;$$) { HttpUtils_NonblockingGet( { - url => $URL, - timeout => $timeout, - noshutdown => $http_noshutdown, - data => $cmd, - hash => $hash, - service => $service, - cmd => $cmd, - type => $type, - callback => \&ENIGMA2_ReceiveCommand, + url => $URL, + timeout => $timeout, + noshutdown => $http_noshutdown, + data => $cmd, + hash => $hash, + service => $service, + cmd => $cmd, + type => $type, + callback => \&ENIGMA2_ReceiveCommand, + httpversion => "1.1", + loglevel => AttrVal( $name, "httpLoglevel", 4 ), + header => { + Agent => 'FHEM-ENIGMA2/1.0.0', + 'User-Agent' => 'FHEM-ENIGMA2/1.0.0', + Accept => 'text/xml;charset=UTF-8', + 'Accept-Charset' => 'UTF-8', + }, + sslargs => { + SSL_verify_mode => 0, + }, } ); }