HttpUtils.pm: Multi-Chunked patch by justme1968 (Forum #122066)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@25487 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2022-01-17 20:59:02 +00:00
parent 7dcbfcc5d3
commit 63cdc20f37

View File

@ -734,7 +734,13 @@ HttpUtils_DataComplete($)
my $ret = substr($r, 0, $l);
if( $hash->{EventSource} ) {
$hash->{callback}($hash, undef, $ret);
$hash->{httpdata} .= $ret;
if( $ret !~ /\n$/ ) {
# data is incomplete
} else {
$hash->{callback}($hash, undef, $hash->{httpdata});
$hash->{httpdata} = '';
}
} else {
$hash->{httpdata} .= $ret;