Do you have a binary diff utility that you could use to see what changed in
the uploaded file? That would be very helpful.

Also, if you can tell me how many bytes were added to the file, and what
type of file it was that caused the problem, that might help too.

Thanks.

--
Martin Cooper


----- Original Message -----
From: "Darryl Pentz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 7:31 AM
Subject: File Upload Corrupting Zip File


> Hi all,
>
> Something happens to corrupt a file I'm uploading from a multipart form.
If
> I run a ZIP file through my unzip utility targeting the actual ZIP file,
it
> unzips just fine. If I point my unzip utility at the temporary file in the
> deployments temp directory of Orion Server (the app server I'm using), the
> utility fails with a ZipException indicating it expected x bytes but got
x+
> bytes on one of the zip entries.
>
> I did the same with WinZip and it worked on the original ZIP and also
failed
> on the uploaded temp file. It seems to me that the problem most likely
lies
> with Struts, particularly the DiskMultipartRequestHandler.java but there's
> nothing in there that appears suspicious. Does anyone have any insight on
> this or has anyone perhaps had this same problem?
>
> Interestingly though, I unzipped the file, removed the entry that was
> causing the problem, rezipped it and everything worked fine. That doesn't
> however exonerate Struts however, since both my zip utility AND WinZip
> worked on the original ZIP. The problem only occurs after Struts has
> uploaded the file.
>
> Here is the output that WinZip gave me when it failed to unzip the temp
> file:
>
> Extracting to "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\"
> Use Path: no   Overlay Files: yes
> warning
>
[C:/orion/application-deployments/wellcert/wellcert-web/temp/strts34531.tmp]
> :  extra 1 bytes at beginning or within Zip file (attempting to process
> anyway)
> Error in file #1:  bad Zip file offset (Error local header signature not
> found):  409756
> (attempting to re-compensate)
> Extracting Image36.gif
> Error: unexpected end of file encountered
> Error:  invalid compressed data to inflate
>
> thanks in advance,
> Darryl Pentz
>


Reply via email to