50cfb506 by Adam Heath

Merge branch 'BF-4051' of /home/git/repositories/brainfood/ofbiz-directcontrolservlet

2 parents 69feb1c7 de3a4c30
......@@ -129,7 +129,8 @@ public class DirectControlServlet extends HttpServlet {
}
} else {
// Check if the request is a backbone style "emulateJSON" request
if (request.getContentType().indexOf("x-www-form-urlencoded") != -1 &&
if (request.getContentType() != null &&
request.getContentType().indexOf("x-www-form-urlencoded") != -1 &&
request.getParameter("model") != null) {
Debug.logInfo("MODEL: " + request.getParameter("model"), module);
JSON json = new JSON(new StringReader(request.getParameter("model")));
......