mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 19:04:20 +00:00
98_update.pm: allow updates from a local FHEM as server (Forum #49798)
git-svn-id: https://svn.fhem.de/fhem/trunk@10942 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
41e00eeb6b
commit
4444ed4b7b
@ -546,8 +546,8 @@ FW_serveSpecial($$$$)
|
|||||||
|
|
||||||
$file = "$FW_sp$file" if($ext eq "css" && -f "$dir/$FW_sp$file.$ext");
|
$file = "$FW_sp$file" if($ext eq "css" && -f "$dir/$FW_sp$file.$ext");
|
||||||
$FW_RETTYPE = ext2MIMEType($ext);
|
$FW_RETTYPE = ext2MIMEType($ext);
|
||||||
return FW_returnFileAsStream("$dir/$file.$ext", "",
|
my $fname = ($ext ? "$file.$ext" : $file);
|
||||||
$FW_RETTYPE, 0, $cacheable);
|
return FW_returnFileAsStream("$dir/$fname", "", $FW_RETTYPE, 0, $cacheable);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
@ -614,7 +614,8 @@ FW_answerCall($)
|
|||||||
|
|
||||||
# pgm2 check is for jquery-ui images
|
# pgm2 check is for jquery-ui images
|
||||||
my $static = ($ext =~ m/(css|js|png|jpg)/i || $dir =~ m/^pgm2/);
|
my $static = ($ext =~ m/(css|js|png|jpg)/i || $dir =~ m/^pgm2/);
|
||||||
if(-r "$ldir/$file.$ext" || $static) { # no return for FLOORPLAN
|
my $fname = ($ext ? "$file.$ext" : $file);
|
||||||
|
if(-r "$ldir/$fname" || $static) { # no return for FLOORPLAN
|
||||||
return FW_serveSpecial($file, $ext, $ldir, ($arg =~ m/nocache/) ? 0 : 1);
|
return FW_serveSpecial($file, $ext, $ldir, ($arg =~ m/nocache/) ? 0 : 1);
|
||||||
}
|
}
|
||||||
$arg = "/$dir/$ofile";
|
$arg = "/$dir/$ofile";
|
||||||
|
@ -500,7 +500,7 @@ upd_getUrl($)
|
|||||||
my ($url) = @_;
|
my ($url) = @_;
|
||||||
$url =~ s/%/%25/g;
|
$url =~ s/%/%25/g;
|
||||||
$upd_connecthash{url} = $url;
|
$upd_connecthash{url} = $url;
|
||||||
$upd_connecthash{keepalive} = 1;
|
$upd_connecthash{keepalive} = ($url =~ m/localUpdate/ ? 0 : 1); # Forum #49798
|
||||||
# $upd_connecthash{compress} = 1; # fhem.de does not support compression
|
# $upd_connecthash{compress} = 1; # fhem.de does not support compression
|
||||||
my ($err, $data) = HttpUtils_BlockingGet(\%upd_connecthash);
|
my ($err, $data) = HttpUtils_BlockingGet(\%upd_connecthash);
|
||||||
if($err) {
|
if($err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user