Skip to content
Myr

refactored res.sendfile()

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 8f87400 · Browse files · 1 file+1 added−6 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−6 removed

  • other:+1 added−6 removed

1 file+1 added−6 removed

modified:lib/response.js+1 added-6 removed
214 unmodified lines
215 // callback216 options.callback = function(err){217 if (err) {218 // cast ENOENT219 if ('ENOENT' == err.code) err = 404;219 if ('ENOENT' == err.code) err = utils.error(404);220221 // coerce numeric error to an Error222 // TODO: remove223 // TODO: remove docs for headerSent?224 if ('number' == typeof err) err = utils.error(err);225221 // ditch content-disposition to prevent funky responses222 if (!self.headerSent) self.removeHeader('Content-Disposition');223224 // woot! callback available
417 unmodified lines