You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Towns, Peter (ANTS)" <pe...@ants.co.uk> on 2002/03/04 12:47:53 UTC

File upload - binary file checksum issue

Hi,

I'm using Struts 1.0's multipart form functionality and it doesn't appear to
be correctly pulling binary content from the request to disk.

Using the sample 'struts-upload.war' app on NT, I've tried to upload & then
write a 600kb Word doc. The file successfully uploaded but the copied
version couldn't be opened by Word (since it was corrupted). The checksums
are different, and a hex dump clarified this - for example, the first diff
is 5452 ASCII chars into the file where an ASCII 65 ('e') becomes an ASCII
0A (a linefeed).

I tried to upload a PDF of equivalent size and the same behaviour occurred.
However, a text file upload was fine...

Has anyone experienced this ..? The linefeed is suspicious, but surely this
isn't a ASCII/binary issue since the multipart contents will just be base64
(or whatever) encoded/decoded prior/post transport ..?

Could this be a bug, or have I missed something ..?

Thanks,

Pete



***************************************************************************
This email message contains confidential information for the above addressee only.  If you are not the intended addressee you must not disclose or use the information in any manner whatsoever.

Any opinion or views contained in this email message are those of the sender, do not represent those of the Company in any way and reliance should not be placed upon its contents.

Unless otherwise stated this email message is not intended to be contractually binding.  Where an Agreement exists between our respective companies and there is conflict between the contents of this email message and the Agreement then the terms of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered Office:  Abbey House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  Regulated by the FSA
***************************************************************************


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>