Skip to content
Myr

Fixed res.sendfile() 404s

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 10e8dc5 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:lib/response.js+1 added-1 removed
181 unmodified lines
182 // ditch content-disposition to prevent funky responses183 if (!self.headerSent) self.removeHeader('Content-Disposition');184185 // not found186 if ('ENOENT' == err.code) return req.next();186 if ('ENOENT' == err.code) return req.next(404);187188 // lost in limbo if there's no callback189 if (self.headerSent) return fn && fn(err);190
363 unmodified lines