favicon redirect add

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1421 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2012-04-07 16:40:35 +00:00
parent d45cd49cc0
commit b32a807de8
2 changed files with 5 additions and 3 deletions

View File

@@ -355,10 +355,12 @@ FW_AnswerCall($)
return 1; return 1;
} elsif($arg =~ m,^$FW_ME/icons/(.*)$, || } elsif($arg =~ m,^$FW_ME/icons/(.*)$, ||
$arg =~ m,^$FW_ME/(.*.png)$,i) { $arg =~ m,^$FW_ME/(.*.png)$,i ||
my $img = $1; $arg =~ m,^/(favicon.ico)$,) {
my $cachable = 1; my ($img, $cachable) = ($1, 1);
$img =~ s,/,,g;
if(!open(FH, "$FW_dir/$img")) { # Hack: convert device state to icon name if(!open(FH, "$FW_dir/$img")) { # Hack: convert device state to icon name
return 0 if($arg eq "/favicon.ico");
FW_ReadIcons(); FW_ReadIcons();
$img = FW_dev2image($img); $img = FW_dev2image($img);
$cachable = 0; $cachable = 0;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB