FHEMWEB: simplify FLOORPLAN handling

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7580 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2015-01-15 18:36:07 +00:00
parent 6aa9732bfd
commit d62ec19e8d

View File

@@ -1513,15 +1513,12 @@ FW_returnFileAsStream($$$$$)
} }
if(!open(FH, $path)) { if(!open(FH, $path)) {
my $npath = FW_fileNameToPath($1) if($path =~ m,([^/]*)$,); Log3 $FW_wname, 4, "FHEMWEB $FW_wname $path: $!";
if(!open(FH, $npath)) { # Old style fake path TcpServer_WriteBlocking($FW_chash,
Log3 $FW_wname, 4, "FHEMWEB $FW_wname $path: $!"; "HTTP/1.1 404 Not Found\r\n".
TcpServer_WriteBlocking($FW_chash, "Content-Length:0\r\n\r\n");
"HTTP/1.1 404 Not Found\r\n". FW_closeConn($FW_chash);
"Content-Length:0\r\n\r\n"); return 0;
FW_closeConn($FW_chash);
return 0;
}
} }
binmode(FH) if($type !~ m/text/); # necessary for Windows binmode(FH) if($type !~ m/text/); # necessary for Windows