Parse Content-Type with "content-type" instead of "media-typer"
This commit is contained in:
parent
089bc45e90
commit
9dd99f5da2
2 changed files with 3 additions and 3 deletions
|
@ -3,8 +3,8 @@
|
|||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var contentType = require('content-type');
|
||||
var stringify = require('url').format;
|
||||
var typer = require('media-typer');
|
||||
var parse = require('parseurl');
|
||||
var qs = require('querystring');
|
||||
var typeis = require('type-is');
|
||||
|
@ -303,7 +303,7 @@ module.exports = {
|
|||
var type = this.get('Content-Type');
|
||||
if (!type) return;
|
||||
|
||||
return typer.parse(type).parameters.charset;
|
||||
return contentType.parse(type).parameters.charset;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"accepts": "^1.2.2",
|
||||
"co": "^4.1.0",
|
||||
"content-disposition": "~0.5.0",
|
||||
"content-type": "^1.0.0",
|
||||
"cookies": "~0.5.0",
|
||||
"debug": "*",
|
||||
"delegates": "0.1.0",
|
||||
|
@ -32,7 +33,6 @@
|
|||
"http-errors": "^1.2.8",
|
||||
"koa-compose": "^2.3.0",
|
||||
"koa-is-json": "^1.0.0",
|
||||
"media-typer": "~0.3.0",
|
||||
"mime-types": "^2.0.7",
|
||||
"on-finished": "^2.1.0",
|
||||
"only": "0.0.2",
|
||||
|
|
Loading…
Reference in a new issue