Skip to content
Myr

refactor res.format(), dont pass "default" to req.accepts()

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 40be3ed · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:lib/response.js+2 added-2 removed
449 unmodified lines
450 * @api public451 */452453res.format = function(obj){454 var keys = Object.keys(obj)455 , req = this.req454 var req = this.req455 , next = req.next;456457 var fn = obj.default;458 if (fn) delete obj.default;459 var keys = Object.keys(obj);460461 var key = req.accepts(keys);462463 this.set('Vary', 'Accept');
256 unmodified lines