File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
3- var xml2js = require ( 'xml2js' ) ,
4- typeis = require ( 'type-is' ) ;
3+ var xml2js = require ( 'xml2js' ) ;
54
65module . exports = function ( bodyParser ) {
76 if ( bodyParser . xml ) {
@@ -21,7 +20,7 @@ module.exports = function(bodyParser) {
2120 // First, run the body through the text parser.
2221 textParser ( req , res , function ( err ) {
2322 if ( err ) { return next ( err ) ; }
24- if ( ! typeis ( req , xmlTypes ) ) { return next ( ) ; }
23+ if ( typeof req . body !== 'string' ) { return next ( ) ; }
2524
2625 // Then, parse as XML.
2726 var parser = new xml2js . Parser ( options . xmlParseOptions ) ;
Original file line number Diff line number Diff line change 2222 },
2323 "homepage" : " https://github.com/fiznool/body-parser-xml#readme" ,
2424 "dependencies" : {
25- "type-is" : " ^1.6.10" ,
2625 "xml2js" : " ^0.4.15"
2726 },
2827 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments