Skip to content
Myr

Added res.sendfile() ENOENT test

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 545f1fd · Browse files · 2 files+26 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

2 files+26 added−1 removed

  • tests:+22 added−0 removed
  • other:+4 added−1 removed

2 files+26 added−1 removed

modified:lib/response.js+4 added-1 removed
184 unmodified lines
185 // forbidden186 if ('Forbidden' == err.message) return req.next(403);187188 // not found189 if ('ENOENT' == err.code) return req.next(404);189 if ('ENOENT' == err.code) {190 if (fn) return fn(err);191 return req.next(404);192 }193194 // lost in limbo if there's no callback195 if (self.headerSent) return fn && fn(err);196
363 unmodified lines
modified:test/res.sendfile.js+22 added