Skip to content
Myr

Added req.accepts() support for extensions

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 05bbc65 · Browse files · 1 file+1 added−0 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−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:lib/express/request.js+1 added
82 unmodified lines
83 */8485http.IncomingMessage.prototype.accepts = function(type){86 var accept = this.header('Accept');87 if (type && '.' == type[0]) type = type.substr(1);88 if (!accept || accept === '*/*') {89 return true;90 } else if (type) {91 // Allow "html" vs "text/html" etc
181 unmodified lines