mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
bugfix: now really returns MIME type
git-svn-id: https://svn.fhem.de/fhem/trunk@1830 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a649867e90
commit
d8bca88c8d
@ -77,7 +77,7 @@ HTTPSRV_CGI(){
|
||||
my $MIMEtype= filename2MIMEType($filename);
|
||||
#return("text/plain; charset=utf-8", "HTTPSRV device: $name, filename: $filename, MIME type: $MIMEtype");
|
||||
if(!defined($defs{$name})) {
|
||||
return("$MIMEtype; charset=utf-8", "Unknown HTTPSRV device: $name");
|
||||
return("text/plain; charset=utf-8", "Unknown HTTPSRV device: $name");
|
||||
}
|
||||
my $directory= $defs{$name}{fhem}{directory};
|
||||
$filename= "$directory/$filename";
|
||||
@ -86,7 +86,7 @@ HTTPSRV_CGI(){
|
||||
binmode(INPUTFILE);
|
||||
@contents= <INPUTFILE>;
|
||||
close(INPUTFILE);
|
||||
return("", join("", @contents));
|
||||
return("$MIMEtype; charset=utf-8", join("", @contents));
|
||||
} else {
|
||||
return("text/plain; charset=utf-8", "File not found: $filename");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user