Re: [Wicket-user] Uploading binary files via MockHttpServletRequest

2007-07-31 Thread Frank Bille
Thanx for the bug report. On 7/31/07, mperham <[EMAIL PROTECTED]> wrote: > > In general, I believe you should be building the request as a byte array, > not a String. > Sounds reasonable. Perhaps you could provide a patch for it? Just attach it to the issue. Frank ---

Re: [Wicket-user] Uploading binary files via MockHttpServletRequest

2007-07-31 Thread mperham
Frank, thanks for replying. I believe the problem is in MockHttpServletRequest.buildRequest(). It takes the binary data out of the file and puts it into a String. This does an implicit decoding of the bytes based on the platform's default encoding (Cp1252 in Windows) and will cause corruption w

Re: [Wicket-user] Uploading binary files via MockHttpServletRequest

2007-07-31 Thread Frank Bille
Hi On 7/31/07, mperham <[EMAIL PROTECTED]> wrote: > > > I'm trying to unit test a page that accepts a binary upload. I've got a > unit > test which works fine for a page that accepts an XML (i.e. text) file but > the binary data seems to cause problems. Does anyone have an example of > how > to