mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 11:26:55 +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:
parent
d2f07186d9
commit
e38500d988
@ -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", "");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user