Parse Content-Type with "content-type" instead of "media-typer"

This commit is contained in:
Douglas Christopher Wilson 2015-02-07 21:24:04 -05:00
parent 089bc45e90
commit 9dd99f5da2
2 changed files with 3 additions and 3 deletions

View file

@ -3,8 +3,8 @@
* Module dependencies. * Module dependencies.
*/ */
var contentType = require('content-type');
var stringify = require('url').format; var stringify = require('url').format;
var typer = require('media-typer');
var parse = require('parseurl'); var parse = require('parseurl');
var qs = require('querystring'); var qs = require('querystring');
var typeis = require('type-is'); var typeis = require('type-is');
@ -303,7 +303,7 @@ module.exports = {
var type = this.get('Content-Type'); var type = this.get('Content-Type');
if (!type) return; if (!type) return;
return typer.parse(type).parameters.charset; return contentType.parse(type).parameters.charset;
}, },
/** /**

View file

@ -21,6 +21,7 @@
"accepts": "^1.2.2", "accepts": "^1.2.2",
"co": "^4.1.0", "co": "^4.1.0",
"content-disposition": "~0.5.0", "content-disposition": "~0.5.0",
"content-type": "^1.0.0",
"cookies": "~0.5.0", "cookies": "~0.5.0",
"debug": "*", "debug": "*",
"delegates": "0.1.0", "delegates": "0.1.0",
@ -32,7 +33,6 @@
"http-errors": "^1.2.8", "http-errors": "^1.2.8",
"koa-compose": "^2.3.0", "koa-compose": "^2.3.0",
"koa-is-json": "^1.0.0", "koa-is-json": "^1.0.0",
"media-typer": "~0.3.0",
"mime-types": "^2.0.7", "mime-types": "^2.0.7",
"on-finished": "^2.1.0", "on-finished": "^2.1.0",
"only": "0.0.2", "only": "0.0.2",