I'm using the FileUpload library and running into a very odd issue that I can't 
seem to track down. I stepped through some of the FileUpload code and had to 
abandon that for a while as it looked like it would take a considerable amount 
of time to figure it out that way.

Here's what I'm doing. I've written a Mock request that I'm using for unit 
tests. It provides a Mock input stream that contains the multipart data. The 
code for most of this hand written, but I got it mostly from HTTP Client. 

I have a unit test that exercises my mock input stream and the FileUpload 
library. One of the tests uploads a simple 6 byte text file and a single form 
field. This tests passes. I have a more complex test that uploads a JAR file 
and a form field and it fails.

I figured that the original File and the File written out by the FileUpload 
would have different bytes at the start or end and it was my mock input stream 
that was causing the issue. To test this theory I opened both files in a HEX 
editor. What I found was that the files differ by one a single byte and that 
byte is at position 305. The other interesting thing I found was that the byte 
that exists in the original and is missing from the FileUpload file is 'FF'.

Anyone run into this type of issue before or have suggestions for places to 
start looking?

Thanks,
-bp


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to