2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

HttpUtils.pm: close keepalive if the server does not support it (Forum #40272)

git-svn-id: https://svn.fhem.de/fhem/trunk@9115 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-08-23 09:40:37 +00:00
parent d2f07186d9
commit e38500d988

View File

@ -350,6 +350,9 @@ HttpUtils_ParseAnswer($$)
my @header0= split(" ", shift @header);
my $code= $header0[1];
# Close if server doesn't support keepalive
HttpUtils_Close($hash) if($hash->{keepalive} and $hash->{httpheader} =~ m/^Connection:\s*close\s*$/mi);
if(!defined($code) || $code eq "") {
return ("$hash->{displayurl}: empty answer received", "");
}