mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
HttpUtils.pm: inflate patch from Markus (Forum #81186)
git-svn-id: https://svn.fhem.de/fhem/trunk@15631 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3e8d7dc25d
commit
05b1f22ef8
@ -812,10 +812,19 @@ HttpUtils_ParseAnswer($)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($hash->{httpheader} =~ /^Content-Encoding: gzip/mi && $HU_use_zlib) {
|
||||
eval { $ret = Compress::Zlib::memGunzip($ret) };
|
||||
return ($@, $ret) if($@);
|
||||
|
||||
if($HU_use_zlib) {
|
||||
if($hash->{httpheader} =~ /^Content-Encoding: gzip/mi) {
|
||||
eval { $ret = Compress::Zlib::memGunzip($ret) };
|
||||
return ($@, $ret) if($@);
|
||||
}
|
||||
|
||||
if($hash->{httpheader} =~ /^Content-Encoding: deflate/mi) {
|
||||
eval { my $i = Compress::Zlib::inflateInit();
|
||||
my $out = $i->inflate($ret);
|
||||
$ret = $out if($out) };
|
||||
return ($@, $ret) if($@);
|
||||
}
|
||||
}
|
||||
|
||||
# Debug
|
||||
|
Loading…
x
Reference in New Issue
Block a user