[ https://issues.apache.org/jira/browse/WICKET-5714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14156563#comment-14156563 ]
ASF subversion and git services commented on WICKET-5714: --------------------------------------------------------- Commit 41e71f9de5d84f24b80da12d2c5bd76216a5cf00 in wicket's branch refs/heads/master from [~mgrigorov] [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=41e71f9 ] WICKET-5714 MockHttpServletRequest.buildRequest() should work for parameters with multiple values with multipart content type (cherry picked from commit fb1f57f4d2be9534580b3a8e54ce98eb07adf77f) > MockHttpServletRequest.buildRequest() should work for parameters with > multiple values with multipart content type > ----------------------------------------------------------------------------------------------------------------- > > Key: WICKET-5714 > URL: https://issues.apache.org/jira/browse/WICKET-5714 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 1.5.11 > Reporter: Dennis Waldherr > Assignee: Martin Grigorov > > The following code in the method MockHttpServletRequest.buildRequest() > iterates over all values of a parameter. When writing the value to the > outputstream it doesn't use the iteration variable, but instead retrieves the > value with "post.getParameterValue(parameterName)" which always returns the > first element of the list. > {code} > List<StringValue> values = > post.getParameterValues(parameterName); > for (StringValue value : values) > { > newAttachment(out); > out.write("; name=\"".getBytes()); > out.write(parameterName.getBytes()); > out.write("\"".getBytes()); > out.write(crlf.getBytes()); > out.write(crlf.getBytes()); > > out.write(post.getParameterValue(parameterName).toString().getBytes()); > out.write(crlf.getBytes()); > } > {code} > So for a given list of values "3", "2" and "1", it actually writes "3", "3" > and "3". -- This message was sent by Atlassian JIRA (v6.3.4#6332)