Skip to content
Myr

Request#accepts() fixed due to ext changes

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

authored by visionmedia · committed by visionmedia · parent 1b09fce · 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/express/request.js+1 added-1 removed
119 unmodified lines
120121 accepts: function() {122 var accept = this.header('accept')123 if (!accept || accept === '*/*') return true124 return arguments.any(function(path){124 return Object.values(arguments).any(function(path){125 var type = mime.type(path)126 return accept.indexOf(type) !== -1 ||127 accept.indexOf(type.split('/')[0] + '/*') !== -1128 })
296 unmodified lines