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

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

View File

@@ -734,7 +734,13 @@ HttpUtils_DataComplete($)
my $ret = substr($r, 0, $l); my $ret = substr($r, 0, $l);
if( $hash->{EventSource} ) { 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 { } else {
$hash->{httpdata} .= $ret; $hash->{httpdata} .= $ret;