Bug 26890 - Multipart/Form-Data Unexpected End Of Part
Summary: Multipart/Form-Data Unexpected End Of Part
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: Common (show other bugs)
Version: unspecified
Hardware: PC other
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2004-02-12 14:59 UTC by Mark Mangrich
Modified: 2008-10-05 03:09 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Mark Mangrich 2004-02-12 14:59:58 UTC
I am getting stream errors when upload large binary files.  I am using Tomcat 
5.018 with a ajp connector via JK2 to Windows 2003 Server IIS.  These errors 
when uploading a form with an encoding type of "Multipart/Form-Data" using 
both the Apache Commons FileUpload package and 
com.oreilly.servlet.MultipartRequest to parse the POST request.  The code 
works on Tomcat 4 running Coyote Connector to IIS on Windows 2000 server, plus 
other builds I have setup.

It is interesting that the errors occur randomly on larger files over 100K.  
Would it help to set the size of the SHM file larger?  I can see the binary 
file is actually completely uploaded to the server, but the content appears to 
not be parseable by these two popular mulitipart form parsers.
Comment 1 Remy Maucherat 2004-02-13 20:20:46 UTC
I think I have seen this problem before in a bug report. This seems to be
specific to JK 2 + IIS.
Comment 2 u.timmerberg 2004-03-02 14:06:10 UTC
I am getting the same problem with Windows 2003, IIS 6.0, JK2 and Tomcat 
5.0.18. The problem occurs on files smaller than 100K, too. 

A sequence of 35 bytes from within the uploadstream will be randomly put in the 
source. As an effect the end-boundary will not be found because the extra-bytes 
will force that the stream is cut off before end of transmission.
Comment 3 Mark Mangrich 2004-03-08 15:08:22 UTC
I have found that the bug does not occur with SSL.  So what I did was run all 
uploading through https for now, until the JK2 Connector goes through a new 
version release.
Comment 4 Yoav Shapira 2004-06-01 13:34:20 UTC
Mark, there has been a new JK2 release (2.0.4) since the last activity on this 
issue.  Have you had a chance to test since?  There have also been a couple of 
tomcat releases in case that matters.
Comment 5 Yoav Shapira 2004-07-21 18:37:18 UTC
No answer in two months, closing item.
Comment 6 Allistair Crossley 2004-11-02 09:15:55 UTC
this is related for those interested to