ce3f4f2b by Jerry Pommer

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

2 parents dd2c9c75 07e6a2b1
......@@ -112,13 +112,14 @@ public class DirectControlServlet extends HttpServlet {
Map<String, Object> context = new HashMap<String, Object>();
String authToken = null;
Debug.logInfo("PARAMETERS: " + request.getParameterMap(), module);
// Handle if this is a form post
String contentType = request.getContentType();
if (contentType != null && contentType.indexOf("application/x-www-form-urlencoded") != -1) {
if (contentType != null && contentType.indexOf("x-www-form-urlencoded") != -1) {
method = request.getParameter("_method");
Debug.logInfo("Method: " + method, module);
if (method == null) method = "POST";
// If this is a backbone PUT/DELETE emulated call then handle it
Debug.logInfo("Method: " + method, module);
if ("PUT".equals(method) || "DELETE".equals(method) || "CALL".equals(method) || "POST".equals(method)) {
// if (!"CALL".equals(method)) context.put("_method", method);
JSON json = new JSON(new StringReader(request.getParameter("model")));
......