Skip to content
Myr

refactored req.is()

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

  • other:+0 added−2 removed

1 file+0 added−2 removed

modified:lib/request.js-2 removed
260 unmodified lines
261 if (fn) return fn(this);262 var contentType = this.headers['content-type'];263 if (!contentType) return;264 if (!~type.indexOf('/')) type = mime.lookup(type);265 // TODO: remove when connect no longer appends charset...266 if (~type.indexOf(';')) type = type.split(';')[0];265 if (~type.indexOf('*')) {266 type = type.split('/')267 contentType = contentType.split('/');268 if ('*' == type[0] && type[1] == contentType[1]) return true;
20 unmodified lines