jgallimore commented on a change in pull request #878:
URL: https://github.com/apache/cxf/pull/878#discussion_r757524512
##########
File path:
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
##########
@@ -175,8 +176,20 @@ public static void
populateMapFromString(MultivaluedMap<String, String> params,
&& MessageUtils.getContextualBoolean(m,
FORM_PARAMS_FROM_HTTP_PARAMS, true)) {
for (Enumeration<String> en = request.getParameterNames();
en.hasMoreElements();) {
String paramName = en.nextElement();
- String[] values = request.getParameterValues(paramName);
- params.put(HttpUtils.urlDecode(paramName),
Arrays.asList(values));
+ String[] parameterValues =
request.getParameterValues(paramName);
+
+ // these parameters will already be URLdecoded by the servlet
container on the
+ // request.getParameterValues() call above
+
+ List<String> values = Arrays.asList(parameterValues);
+
+ if (!decode) {
Review comment:
I'm not a fan of the solution, which is probably a slightly bizarre
comment to make on my own code. There is a scenario where CXF is reading
parameters from HttpServetReques.getParameter(), where the parameter itself is
annotated with `@Encoded`. In that scenario, I'm not sure how we can provide
the parameter correctly without re-encoding.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]