File tree 3 files changed +16
-6
lines changed
3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1
1
3.x
2
2
===
3
3
4
+ * Use ` content-type ` to parse ` Content-Type ` headers
4
5
5
6
- Use ` content-type ` to parse ` Content-Type ` headers
6
7
- deps: body-parser@~ 1.12.0
Original file line number Diff line number Diff line change
1
+ /*!
2
+ * express
3
+ * Copyright(c) 2009-2013 TJ Holowaychuk
4
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
5
+ * MIT Licensed
6
+ */
1
7
2
8
/**
3
9
* Module dependencies.
10
+ * @api private
4
11
*/
5
12
13
+ var contentType = require ( 'content-type' ) ;
6
14
var etag = require ( 'etag' ) ;
7
15
var mime = require ( 'connect' ) . mime ;
8
16
var proxyaddr = require ( 'proxy-addr' ) ;
9
- var typer = require ( 'media-typer' ) ;
10
17
11
18
/**
12
19
* toString ref.
@@ -393,15 +400,17 @@ exports.compileTrust = function(val) {
393
400
* @api private
394
401
*/
395
402
396
- exports . setCharset = function ( type , charset ) {
397
- if ( ! type || ! charset ) return type ;
403
+ exports . setCharset = function setCharset ( type , charset ) {
404
+ if ( ! type || ! charset ) {
405
+ return type ;
406
+ }
398
407
399
408
// parse type
400
- var parsed = typer . parse ( type ) ;
409
+ var parsed = contentType . parse ( type ) ;
401
410
402
411
// set charset
403
412
parsed . parameters . charset = charset ;
404
413
405
414
// format type
406
- return typer . format ( parsed ) ;
415
+ return contentType . format ( parsed ) ;
407
416
} ;
Original file line number Diff line number Diff line change 29
29
"basic-auth" : " 1.0.0" ,
30
30
"connect" : " 2.29.0" ,
31
31
"content-disposition" : " 0.5.0" ,
32
+ "content-type" : " ~1.0.1" ,
32
33
"commander" : " 2.6.0" ,
33
34
"cookie-signature" : " 1.0.6" ,
34
35
"debug" : " ~2.1.1" ,
35
36
"depd" : " ~1.0.0" ,
36
37
"escape-html" : " 1.0.1" ,
37
38
"etag" : " ~1.5.1" ,
38
39
"fresh" : " 0.2.4" ,
39
- "media-typer" : " 0.3.0" ,
40
40
"methods" : " ~1.1.1" ,
41
41
"mkdirp" : " 0.5.0" ,
42
42
"parseurl" : " ~1.3.0" ,
You can’t perform that action at this time.
0 commit comments