refactor to use set-type
This commit is contained in:
parent
0cacc5706a
commit
163e59c0d5
3 changed files with 6 additions and 5 deletions
|
@ -2,8 +2,9 @@
|
||||||
HEAD /
|
HEAD /
|
||||||
==================
|
==================
|
||||||
|
|
||||||
* refactor mime with mime-extended
|
* refactor to use:
|
||||||
* refactor to use koa-is-json
|
* koa-is-json
|
||||||
|
* set-type
|
||||||
|
|
||||||
0.5.5 / 2014-04-14
|
0.5.5 / 2014-04-14
|
||||||
==================
|
==================
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
var ensureErrorHandler = require('error-inject');
|
var ensureErrorHandler = require('error-inject');
|
||||||
var escape = require('escape-html');
|
var escape = require('escape-html');
|
||||||
var onfinish = require('finished');
|
var onfinish = require('finished');
|
||||||
|
var setType = require('set-type');
|
||||||
var status = require('statuses');
|
var status = require('statuses');
|
||||||
var destroy = require('dethroy');
|
var destroy = require('dethroy');
|
||||||
var http = require('http');
|
var http = require('http');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var mime = require('mime-extended');
|
|
||||||
var basename = path.basename;
|
var basename = path.basename;
|
||||||
var extname = path.extname;
|
var extname = path.extname;
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ module.exports = {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
set type(type) {
|
set type(type) {
|
||||||
this.set('Content-Type', mime.contentType(type));
|
this.set('Content-Type', setType(type));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
"statuses": "~1.0.1",
|
"statuses": "~1.0.1",
|
||||||
"accepts": "~1.0.0",
|
"accepts": "~1.0.0",
|
||||||
"type-is": "~1.1.0",
|
"type-is": "~1.1.0",
|
||||||
|
"set-type": "~1.0.0",
|
||||||
"finished": "~1.1.1",
|
"finished": "~1.1.1",
|
||||||
"co": "~3.0.2",
|
"co": "~3.0.2",
|
||||||
"debug": "*",
|
"debug": "*",
|
||||||
"mime": "~1.2.11",
|
"mime": "~1.2.11",
|
||||||
"mime-extended": "^1.0.0",
|
|
||||||
"fresh": "~0.2.1",
|
"fresh": "~0.2.1",
|
||||||
"koa-compose": "~2.2.0",
|
"koa-compose": "~2.2.0",
|
||||||
"koa-is-json": "~1.0.0",
|
"koa-is-json": "~1.0.0",
|
||||||
|
|
Loading…
Reference in a new issue