mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
Relocated the require "Zlib".
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@596 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
443884b7cc
commit
084fa6d9d5
@ -171,9 +171,18 @@ FW_Read($)
|
||||
}
|
||||
|
||||
$__wname = $hash->{SNAME};
|
||||
|
||||
my $ll = GetLogLevel($__wname,4);
|
||||
|
||||
if(!$zlib_loaded && FW_getAttr($__wname, "fwcompress", 1)) {
|
||||
$zlib_loaded = 1;
|
||||
eval { require Compress::Zlib; };
|
||||
if($@) {
|
||||
Log 1, $@;
|
||||
Log 1, "$__wname: Can't load Compress::Zlib, deactivating compression";
|
||||
$attr{$__wname}{fwcompress} = 0;
|
||||
}
|
||||
}
|
||||
|
||||
# Data from HTTP Client
|
||||
my $buf;
|
||||
my $ret = sysread($hash->{CD}, $buf, 1024);
|
||||
@ -207,16 +216,6 @@ FW_Read($)
|
||||
$defs{$name} = $hash;
|
||||
}
|
||||
|
||||
if(!$zlib_loaded && FW_getAttr($__wname, "fwcompress", 1)) {
|
||||
$zlib_loaded = 1;
|
||||
eval { require Compress::Zlib; };
|
||||
if($@) {
|
||||
Log 1, $@;
|
||||
Log 1, "$__wname: Can't load Compress::Zlib, deactivating compression";
|
||||
$attr{$__wname}{fwcompress} = 0;
|
||||
}
|
||||
}
|
||||
|
||||
my $compressed = "";
|
||||
if(($__RETTYPE=~m/text/i || $__RETTYPE=~m/svg/i || $__RETTYPE=~m/script/i) &&
|
||||
(int(@enc) == 1 && $enc[0] =~ m/gzip/) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user