diff --git a/History.md b/History.md index 678317d..0f98853 100644 --- a/History.md +++ b/History.md @@ -2,8 +2,9 @@ HEAD / ================== - * refactor mime with mime-extended - * refactor to use koa-is-json + * refactor to use: + * koa-is-json + * set-type 0.5.5 / 2014-04-14 ================== diff --git a/lib/response.js b/lib/response.js index b5d0dbc..5a57b14 100644 --- a/lib/response.js +++ b/lib/response.js @@ -6,11 +6,11 @@ var ensureErrorHandler = require('error-inject'); var escape = require('escape-html'); var onfinish = require('finished'); +var setType = require('set-type'); var status = require('statuses'); var destroy = require('dethroy'); var http = require('http'); var path = require('path'); -var mime = require('mime-extended'); var basename = path.basename; var extname = path.extname; @@ -264,7 +264,7 @@ module.exports = { */ set type(type) { - this.set('Content-Type', mime.contentType(type)); + this.set('Content-Type', setType(type)); }, /** diff --git a/package.json b/package.json index c00394a..b91d61a 100644 --- a/package.json +++ b/package.json @@ -25,11 +25,11 @@ "statuses": "~1.0.1", "accepts": "~1.0.0", "type-is": "~1.1.0", + "set-type": "~1.0.0", "finished": "~1.1.1", "co": "~3.0.2", "debug": "*", "mime": "~1.2.11", - "mime-extended": "^1.0.0", "fresh": "~0.2.1", "koa-compose": "~2.2.0", "koa-is-json": "~1.0.0",