Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions config/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ module.exports.http = {
// Create and return the middleware function
return function(req, res, next) {
// If we see an application/xml header, parse the body as XML
if (req.headers['content-type'] == 'application/xml') {
return xmlparser(req, res, next);
var cType =req.headers['content-type'];
if (cType){
if (cType.indexOf('xml')>-1) {
return xmlparser(req, res, next);
}
}
// Otherwise use Skipper to parse the body
return skipper(req, res, next);
Expand Down