Description: use system's mime-types instead of taking
 them from Internet.
 Update README according with these changes.
Author: Leo Iannacone <l3on@ubuntu.com>
Forwarded: not-needed

---
 node_modules/mime-db/README.md             |    4 +--
 node_modules/mime-db/scripts/build.js      |   31 -----------------------------
 node_modules/mime-db/scripts/extensions.js |   20 +++---------------
 node_modules/mime-db/test/index.js         |   11 ++--------
 4 files changed, 10 insertions(+), 56 deletions(-)

--- a/node_modules/mime-db/scripts/build.js
+++ b/node_modules/mime-db/scripts/build.js
@@ -1,41 +1,12 @@

 var db = {}

-// initialize with all the IANA types
-require('../src/iana.json').forEach(function (mime) {
-  // i don't think the name is useful,
-  // and i don't think we need to bother with the "Reference"
-  // just look at the site yourself!
-
-  var name = mime[0]
-  var template = mime[1]
-  // for some reason, references are split into multiple values...
-  var type = mime[mime.length - 1]
-
-  if (!template) {
-    // some types don't have a template, so we guess it
-    console.log('guessing: %s/%s', type, name)
-    template = type + '/' + name
-  }
-
-  if (!~template.indexOf('/')) {
-    // i don't know what templates exactly are,
-    // but some aren't valid mime types.
-    console.log('prefixing: %s/%s', type, template)
-    template = type + '/' + template
-  }
-
-  db[template.toLowerCase()] = {
-    source: 'iana'
-  }
-})
-
 // add the mime extensions from Apache
 var mime = require('../src/mime.json')
 Object.keys(mime).forEach(function (type) {
   var e = mime[type]
   var t = type.toLowerCase()
-  var o = db[t] = db[t] || {source: 'apache'}
+  var o = db[t] = db[t] || {source: 'mime-support'}
   if (e.length) o.extensions = (o.extensions || []).concat(e)
 })

--- a/node_modules/mime-db/README.md
+++ b/node_modules/mime-db/README.md
@@ -11,8 +11,8 @@
 allowing it to remain as unopinionated as possible with an API.
 It aggregates data from the following sources:

-- http://www.iana.org/assignments/media-types/media-types.xhtml
-- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
+ * /etc/mime.types
+ * /usr/share/node-mime/node.types

 ## Usage

--- a/node_modules/mime-db/scripts/extensions.js
+++ b/node_modules/mime-db/scripts/extensions.js
@@ -3,27 +3,15 @@
  * Convert these text files to JSON for browser usage.
  */

-var co = require('co')
 var fs = require('fs')
 var path = require('path')
-var cogent = require('cogent')

-co(function* () {
-  yield [
-    get('http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types'),
-    get('https://raw.githubusercontent.com/broofa/node-mime/master/types/node.types')
-  ]
-})()
+get('/etc/mime.types');
+get('/usr/share/node-mime/node.types');

-function* get(url) {
-  var res = yield* cogent(url, {
-    string: true
-  })
+function get(url) {

-  if (res.statusCode !== 200)
-    throw new Error('got status code ' + res.statusCode + ' from ' + url)
-
-  var text = res.text
+  var text = fs.readFileSync(url, 'utf8')
   var json = {}
   // http://en.wikipedia.org/wiki/Internet_media_type#Naming
   /**
