HttpUtils.pm: close keepalive if the server does not support it (Forum #40272)
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@9115 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -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", "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user