Make detection of form-encoded forgiving #4034
Showing
1 changed file
with
3 additions
and
1 deletions
... | @@ -130,8 +130,10 @@ public class DirectControlServlet extends HttpServlet { | ... | @@ -130,8 +130,10 @@ public class DirectControlServlet extends HttpServlet { |
130 | } | 130 | } |
131 | } else { | 131 | } else { |
132 | // Check if the request is a backbone style "emulateJSON" request | 132 | // Check if the request is a backbone style "emulateJSON" request |
133 | if (request.getContentType() == "application/x-www-form-urlencoded" && | 133 | Debug.logInfo("MODEL: " + request.getParameter("model"), module); |
134 | if (request.getContentType().indexOf("x-www-form-urlencoded") > 0 && | ||
134 | request.getParameter("model") != null) { | 135 | request.getParameter("model") != null) { |
136 | Debug.logInfo("MODEL: " + request.getParameter("model"), module); | ||
135 | JSON json = new JSON(new StringReader(request.getParameter("model"))); | 137 | JSON json = new JSON(new StringReader(request.getParameter("model"))); |
136 | Map<String,Object> items = json.JSONObject(); | 138 | Map<String,Object> items = json.JSONObject(); |
137 | for (String key : items.keySet()) { | 139 | for (String key : items.keySet()) { | ... | ... |
-
Please register or sign in to post a comment