This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Serve the file directly using buffers | |
function onRead(err, data) { | |
if (err) return next(err); | |
// Zero length buffers act funny, use a string | |
if (data.length === 0) data = ''; | |
res.writeHead(200, { | |
"Content-Type": utils.mime.type(filename), | |
"Content-Length": data.length, |