You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org> on 2007/08/01 11:07:52 UTC

[jira] Commented: (WICKET-807) MockHttpServletRequest.addFile does not work with binary files

    [ https://issues.apache.org/jira/browse/WICKET-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516902 ] 

Jean-Baptiste Quenot commented on WICKET-807:
---------------------------------------------

Hi Mike, would you mind to submit a complement to Wicket's unit tests (as a patch if possible)?  That would help to address the issue in a timely manner.  See for example org.apache.wicket.markup.html.form.upload.FileUploadFieldTest.  Thanks in advance!

> MockHttpServletRequest.addFile does not work with binary files
> --------------------------------------------------------------
>
>                 Key: WICKET-807
>                 URL: https://issues.apache.org/jira/browse/WICKET-807
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.2.6
>            Reporter: Mike Perham
>
> http://www.nabble.com/Uploading-binary-files-via-MockHttpServletRequest-tf4192893.html#a11934991
> As stated in the thread, I can upload text (xml) files just fine but binary data does not work.  I suspect there are some encoding issues which cause the binary data to be corrupted.  buildRequest() looks like it is corrupting the binary data when it pushes the data into String format.  I don't think this is right - you should treat the request as a byte array, not a String.  I think the MIME or HTTP RFCs might have more info on how binary data is supposed to be packaged within an HTTP request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.