No longer remove an incoming _sessionId; also, slight simplication of
the code that skips over _method removal.
Showing
1 changed file
with
2 additions
and
3 deletions
... | @@ -152,10 +152,9 @@ public class DirectControlServlet extends HttpServlet { | ... | @@ -152,10 +152,9 @@ public class DirectControlServlet extends HttpServlet { |
152 | for (Enumeration<String> params = request.getParameterNames(); params.hasMoreElements();) { | 152 | for (Enumeration<String> params = request.getParameterNames(); params.hasMoreElements();) { |
153 | String param = params.nextElement(); | 153 | String param = params.nextElement(); |
154 | Object[] values = request.getParameterValues(param); | 154 | Object[] values = request.getParameterValues(param); |
155 | if (!"sessionId".equals(param) && !"_method".equals(param)) { | 155 | context.put(param, values.length == 1 ? values[0] : values); |
156 | context.put(param, values.length == 1 ? values[0] : values); | ||
157 | } | ||
158 | } | 156 | } |
157 | context.remove("_method"); | ||
159 | 158 | ||
160 | if ("application/json".equals(contentType)) { | 159 | if ("application/json".equals(contentType)) { |
161 | // Read request body as JSON and insert into the context | 160 | // Read request body as JSON and insert into the context | ... | ... |
-
Please register or sign in to post a comment