Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
6.18.0, 6.19.0
-
None
-
None
Description
To Reproduce:
I was able to easily reproduce it with the simplest submit button: https://github.com/baholladay/wicketrequesterror
All you need to do is click submit and you'll see the parameter value. Then change the wicket version from 6.16.0 to 6.19.0 and rebuild and click submit and you'll see no value after clicking submit.
Description:
I'm trying to upgrade to 6.19.0 from 6.16.0 and one of my rest endpoints doesn't have access to the post parameters anymore.
I mount a specific endpoint to a page:
Application.java
mountPage("/fileUpload", FileUploadRest.class);
and then look for the parameters in the page
FileUploadRest extends WebPage{
public FileUploadRest(){
final ServletWebRequest webRequest = (ServletWebRequest) getRequest();
MultipartServletWebRequest multiPartRequest = webRequest.newMultipartWebRequest(Bytes.megabytes(100), "ignored");
String uuid = multiPartRequest.getRequestParameters().getParameterValue("uuid").toString();
...
}
This UUID parameter works fine in 6.16.0 but is always null in 6.19.0. This is true for all parameters and the file passed in. I verified that the post is sending the data (by looking at the developer Network tab in chrome).
Request Payload:
------WebKitFormBoundaryttKBVItmK4S1fZNP
Content-Disposition: form-data; name="myAwesomeDropzone_hf_0"
------WebKitFormBoundaryttKBVItmK4S1fZNP
Content-Disposition: form-data; name="uuid"
4e238b39-478d-4938-8bc2-0416508b04c6
------WebKitFormBoundaryttKBVItmK4S1fZNP
Content-Disposition: form-data; name="file"; filename="test4.pdf"
Content-Type: application/pdf
I've also tried using a Resource and mounting that instead of a WebPage by following the stackoverflow suggestion [1], but got the same results where no parameters were being passed through.
[1] http://stackoverflow.com/questions/17874695/wicket-http-post-get-raw-data-from-servletrequest
Attachments
Issue Links
- is duplicated by
-
WICKET-5963 File upload post to AbstractResource does not receive files
- Resolved