mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
FHEM/HttpUtils.pm: remove buf (Forum #81099)
git-svn-id: https://svn.fhem.de/fhem/trunk@15618 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
35ebe98b58
commit
988cdb8d25
@ -615,7 +615,6 @@ sub
|
|||||||
HttpUtils_DataComplete($)
|
HttpUtils_DataComplete($)
|
||||||
{
|
{
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
my ($hdr, $data) = ($1, $2);
|
|
||||||
my $hl = $hash->{httpdatalen};
|
my $hl = $hash->{httpdatalen};
|
||||||
if(!defined($hl)) {
|
if(!defined($hl)) {
|
||||||
return 0 if($hash->{buf} !~ m/^(.*?)\r?\n\r?\n(.*)$/s);
|
return 0 if($hash->{buf} !~ m/^(.*?)\r?\n\r?\n(.*)$/s);
|
||||||
@ -744,8 +743,11 @@ HttpUtils_ParseAnswer($)
|
|||||||
if($hash->{buf} =~ m/^(HTTP.*?)\r?\n\r?\n(.*)$/s) {
|
if($hash->{buf} =~ m/^(HTTP.*?)\r?\n\r?\n(.*)$/s) {
|
||||||
$hash->{httpheader} = $1;
|
$hash->{httpheader} = $1;
|
||||||
$hash->{httpdata} = $2;
|
$hash->{httpdata} = $2;
|
||||||
|
delete($hash->{buf});
|
||||||
} else {
|
} else {
|
||||||
return ("", $hash->{buf});
|
my $ret = $hash->{buf};
|
||||||
|
delete($hash->{buf});
|
||||||
|
return ("", $ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
my $ret = $hash->{httpdata};
|
my $ret = $hash->{httpdata};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user