Skip to content
Myr

res.sendfile() using fs.stat()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent b9992e0 · Browse files · 1 file+7 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−4 removed

  • other:+7 added−4 removed

1 file+7 added−4 removed

modified:lib/express/response.js+7 added-4 removed
136 unmodified lines
137 self.req.next(err);138 }139 }140141 fs.readFile(path, function(err, buf){141 fs.stat(path, function(err, stat){142 if (err) return error(err);143 fs.readFile(path, function(err, buf){144 if (err) return error(err);143 self.contentType(path);144 self.send(buf);145 fn && fn(null, path);145 self.contentType(path);146 self.send(buf);147 fn && fn(null, path);148 });149 });150};151152/**
172 unmodified lines