Skip to content
Myr

mime.type() no longer accepts ".type"

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

authored by visionmedia · committed by visionmedia · parent 9509237 · Browse files · 2 files+0 added−9 removed
This commit

State

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

Diff stats

2 files+0 added−9 removed

  • tests:+0 added−7 removed
  • other:+0 added−2 removed

2 files+0 added−9 removed

modified:lib/express/mime.js-2 removed
350 unmodified lines
351 * setting.352 *353 * var mime = require('express/mime')354 * mime.type('png') // => 'image/png'355 * mime.type('.png') // => 'image/png'355 * mime.type('image.png') // => 'image/png'356 * mime.type('path/to/image.png') // => 'image/png'357 *358 * @param {string} path
2 unmodified lines
361 * @api public362 */363364exports.type = function(path) {366 if (path[0] === '.') path = path.substr(1)365 return exports.types[path] || 366 exports.types[extname(path).substr(1)] || 367 set('default mime type') || 368 'application/octet-stream'
1 unmodified line
modified:spec/spec.mime.js-7 removed