07e6a2b1 by Ean Schuessler

Fixes to work around Node NAJAX

1 parent dd2c9c75
...@@ -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")));
......