Skip to content
Myr

misc refactoring

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

  • other:+2 added−4 removed

1 file+2 added−4 removed

modified:lib/request.js+2 added-4 removed
104 unmodified lines
105 if (!accept || '*/*' == accept) {106 return true;107 } else if (type) {108 // allow "html" vs "text/html" etc109 if (type.indexOf('/') < 0) {110 type = mime.lookup(type);111 }109 if (!~type.indexOf('/')) type = mime.lookup(type);110111 // check if we have a direct match112 if (~accept.indexOf(type)) return true;113114 // check if we have type/*115 type = type.split('/')[0] + '/*';118 return accept.indexOf(type) >= 0;116 return !!~accept.indexOf(type);117 } else {118 return false;119 }120};
167 unmodified lines