+ mp4 mime magic.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4059 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
acc14f7318
commit
72952e0c39
@ -508,6 +508,9 @@ function sendData(response, data, type, headers) {
|
|||||||
} else if (startsWithBytes(data, [null, null, null, null, 0x66, 0x74, 0x79, 0x70, 0x6d, 0x70, 0x34, 0x32])) {
|
} else if (startsWithBytes(data, [null, null, null, null, 0x66, 0x74, 0x79, 0x70, 0x6d, 0x70, 0x34, 0x32])) {
|
||||||
response.writeHead(200, Object.assign({"Content-Type": "audio/mpeg", "Content-Length": data.byteLength}, headers || {}));
|
response.writeHead(200, Object.assign({"Content-Type": "audio/mpeg", "Content-Length": data.byteLength}, headers || {}));
|
||||||
response.end(data);
|
response.end(data);
|
||||||
|
} else if (startsWithBytes(data, [null, null, null, null, 0x66, 0x74, 0x79, 0x70, 0x69, 0x73, 0x6f, 0x6d])) {
|
||||||
|
response.writeHead(200, Object.assign({"Content-Type": "video/mp4", "Content-Length": data.byteLength}, headers || {}));
|
||||||
|
response.end(data);
|
||||||
} else {
|
} else {
|
||||||
response.writeHead(200, Object.assign({"Content-Type": type || "text/javascript; charset=utf-8", "Content-Length": data.byteLength}, headers || {}));
|
response.writeHead(200, Object.assign({"Content-Type": type || "text/javascript; charset=utf-8", "Content-Length": data.byteLength}, headers || {}));
|
||||||
response.end(data);
|
response.end(data);
|
||||||
|
Loading…
Reference in New Issue
Block a user