mirror of https://github.com/mikaku/Monitorix.git
Fix warning for undefined mimetype on some http requests.
This commit is contained in:
parent
53569ee617
commit
95dbed04e5
|
@ -167,14 +167,16 @@ sub http_header {
|
||||||
print "Server: Monitorix HTTP Server\r\n";
|
print "Server: Monitorix HTTP Server\r\n";
|
||||||
print "Connection: close\r\n";
|
print "Connection: close\r\n";
|
||||||
|
|
||||||
if($mimetype =~ m/(html|cgi)/) {
|
if (defined($mimetype)) {
|
||||||
print "Content-Type: text/html; charset=UTF-8\r\n";
|
if($mimetype =~ m/(html|cgi)/) {
|
||||||
} elsif($mimetype eq "css") {
|
print "Content-Type: text/html; charset=UTF-8\r\n";
|
||||||
print "Content-Type: text/css; charset=UTF-8\r\n";
|
} elsif($mimetype eq "css") {
|
||||||
} elsif($mimetype eq "svg") {
|
print "Content-Type: text/css; charset=UTF-8\r\n";
|
||||||
print "Content-Type: image/svg+xml; charset=UTF-8\r\n";
|
} elsif($mimetype eq "svg") {
|
||||||
} else {
|
print "Content-Type: image/svg+xml; charset=UTF-8\r\n";
|
||||||
print "Content-Type: image/$mimetype;\r\n";
|
} else {
|
||||||
|
print "Content-Type: image/$mimetype;\r\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "\r\n";
|
print "\r\n";
|
||||||
|
|
Loading…
Reference in New Issue