From c23147cd9418efd23a9bd365acf376790f1f9680 Mon Sep 17 00:00:00 2001 From: Andy Aylward Date: Wed, 30 Jan 2013 15:41:18 -0500 Subject: [PATCH] Update xmlBodyParser.coffee sometimes xml responses come with a "text/xml" content-type --- xmlBodyParser.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmlBodyParser.coffee b/xmlBodyParser.coffee index 3af5ad8..95aedf9 100644 --- a/xmlBodyParser.coffee +++ b/xmlBodyParser.coffee @@ -11,7 +11,7 @@ xmlBodyParser = (req, res, next) -> return next() if "GET" is req.method or "HEAD" is req.method # check Content-Type - return next() unless "application/xml" is utils.mime(req) + return next() unless "application/xml" is utils.mime(req) or "text/xml" is utils.mime(req) # flag as parsed req._body = true @@ -31,4 +31,4 @@ xmlBodyParser = (req, res, next) -> req.body = json next() -exports.xmlBodyParser = xmlBodyParser \ No newline at end of file +exports.xmlBodyParser = xmlBodyParser