mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
Add a few more mimetypes.
This commit is contained in:
@@ -135,10 +135,16 @@ http.createServer(function (request, response) {
|
||||
head["Content-Type"] = "application/vnd.oasis.opendocument.spreadsheet";
|
||||
} else if (filename.substr(-4) === ".txt") {
|
||||
head["Content-Type"] = "text/plain; charset=utf-8";
|
||||
} else if (filename.substr(-5) === ".html") {
|
||||
head["Content-Type"] = "text/html; charset=utf-8";
|
||||
} else if (filename.substr(-6) === ".xhtml") {
|
||||
head["Content-Type"] = "application/xhtml+xml; charset=utf-8";
|
||||
} else if (filename.substr(-4) === ".xml") {
|
||||
head["Content-Type"] = "text/xml; charset=utf-8";
|
||||
} else if (filename.substr(-4) === ".ttf") {
|
||||
head["Content-Type"] = "application/x-font-ttf";
|
||||
} else if (filename.substr(-4) === ".png") {
|
||||
head["Content-Type"] = "image/png";
|
||||
}
|
||||
response.writeHead(200, head);
|
||||
if (request.method !== "HEAD") {
|
||||
|
||||
Reference in New Issue
Block a user