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 { ...@@ -112,13 +112,14 @@ public class DirectControlServlet extends HttpServlet {
112 Map<String, Object> context = new HashMap<String, Object>(); 112 Map<String, Object> context = new HashMap<String, Object>();
113 String authToken = null; 113 String authToken = null;
114 114
115 Debug.logInfo("PARAMETERS: " + request.getParameterMap(), module);
115 // Handle if this is a form post 116 // Handle if this is a form post
116 String contentType = request.getContentType(); 117 String contentType = request.getContentType();
117 if (contentType != null && contentType.indexOf("application/x-www-form-urlencoded") != -1) { 118 if (contentType != null && contentType.indexOf("x-www-form-urlencoded") != -1) {
118 method = request.getParameter("_method"); 119 method = request.getParameter("_method");
120 Debug.logInfo("Method: " + method, module);
119 if (method == null) method = "POST"; 121 if (method == null) method = "POST";
120 // If this is a backbone PUT/DELETE emulated call then handle it 122 // If this is a backbone PUT/DELETE emulated call then handle it
121 Debug.logInfo("Method: " + method, module);
122 if ("PUT".equals(method) || "DELETE".equals(method) || "CALL".equals(method) || "POST".equals(method)) { 123 if ("PUT".equals(method) || "DELETE".equals(method) || "CALL".equals(method) || "POST".equals(method)) {
123 // if (!"CALL".equals(method)) context.put("_method", method); 124 // if (!"CALL".equals(method)) context.put("_method", method);
124 JSON json = new JSON(new StringReader(request.getParameter("model"))); 125 JSON json = new JSON(new StringReader(request.getParameter("model")));
......