tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <Allistair.Cross...@QAS.com>
Subject RE: IIS mod_jk2 2.0.4 Bug???
Date Thu, 08 Apr 2004 19:25:38 GMT
Yes it is Yoav. The error is "stream unexpectedly terminated". I could not find anything on
this at all. I resorted to having my multipart form upload to :8080 and then my action redirects
back onto the IIS route through :80. 
 
Cheers, ADC

	-----Original Message----- 
	From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com] 
	Sent: Thu 08/04/2004 19:38 
	To: Tomcat Users List 
	Cc: 
	Subject: RE: IIS mod_jk2 2.0.4 Bug???
	
	


	Hi,
	Is MultipartParser the one from com.oreilly.servlets?
	
	Is the same behavior observed using commons-fileupload
	(http://jakarta.apache.org/commons/fileupload/), which is bundled with
	tomcat so hopefully you can test it easily?
	
	Yoav Shapira
	Millennium Research Informatics
	
	
	>-----Original Message-----
	>From: E Cunningham [mailto:eac26@yahoo.com]
	>Sent: Thursday, April 08, 2004 2:35 PM
	>To: Tomcat Users List
	>Subject: Re: IIS mod_jk2 2.0.4 Bug???
	>
	>
	>Follow-up:
	>Using stock Tomcat 4.1.30 and a pretty vanilla
	>DocUpload servlet we have been able to upload
	>various sized files with out error. But when adding
	>IIS and the redirector into the mix then we find
	>that the files get corrupted if the size of the file
	>is more than 55.1K (as described below).
	>
	>This is a major bug with JK2 2.0.4.
	>
	>The upload breaks between 56,462 and 56,562 bytes
	>(where the 56,462 works and 56,562 fails).
	>I've tested with the following sized files (in the
	>format: archive size/actual size. '*' denotes
	>breakage):
	>
	>2,149 bytes 1k
	>11,184 bytes 10k
	>21,224 bytes 20k
	>41,302 bytes 40k
	>51,340 bytes 50k
	>56,360 bytes 55k
	>56,462 bytes 55.1k
	>56,562 bytes 55.2k *
	>56,864 bytes 55.5k *
	>61,380 bytes 60k   *
	>81,458 bytes 80k   *
	>
	>Every one of these tests works without the IIS
	>redirector. This is highly repeatable.
	>
	>Here is the DocUpload servlet:
	>
	>
	>import javax.servlet.*;
	>import javax.servlet.http.*;
	>import java.io.*;
	>import java.util.Hashtable;
	>
	>public class Upload extends HttpServlet
	>{
	>public void service(ServletRequest request,
	>ServletResponse response)
	>        throws IOException
	>{
	>       PrintWriter out = null;
	>       try {
	>               int id=0;
	>
	>               out = response.getWriter();
	>
	>               String file = new String("");
	>
	>               MultipartParser parser = new
	>MultipartParser((HttpServletRequest)request, 1024 *
	>1024);
	>               Part aPart;
	>               Hashtable formElements = new Hashtable();
	>               while( (aPart = parser.readNextPart()) != null
	>) {
	>                       if( aPart.isParam() == true ) {
	>                               ParamPart pPart = (ParamPart)aPart;
	>                               String field = pPart.getName();
	>                               String value = pPart.getStringValue();
	>                               if(field != null) {
	>                                       if(value == null)
	>                                               value = "";
	>                                       formElements.put(field, value);
	>                               }
	>                       }
	>                       else if( aPart.isFile() == true ) {
	>                               FilePart fPart = (FilePart)aPart;
	>                               String field = fPart.getName();
	>                               String fileName = fPart.getFileName();
	>                               if(fileName != null) {
	>                                       //write the image to a file
	>                                       String dir = "";
	>                                       File theFile = new File(dir,
	fileName);
	>                                       fPart.writeTo(theFile);
	>                                       formElements.put(field,
	fileName);
	>                               }
	>                       }
	>               }
	>               out.println("File upload success");
	>       } catch (Exception e) {
	>               out.println("An error occurred.");
	>               e.printStackTrace(out);
	>       }
	>       out.flush();
	>}
	>}
	>
	>
	>
	>
	>
	>--- E Cunningham <eac26@yahoo.com> wrote:
	>>
	>> We just downloaded the recently released 2.0.4
	>> mod_jk2
	>>
	>> connector and found a bug.
	>>
	>> Upload a binary document that is larger than 48K
	>> using a servlet that has been well tested for a few
	>> years against straight Tomcat, mod_jk and previous
	>> versions of mod_jk2 (v2.0.3) for both IIS and NSAPI.
	>>
	>> Then download using another well tested servlet only
	>>
	>> to find that the document was corrupted.
	>>
	>> Documents are missing 4 bytes at the 48305, 48318,
	>> or
	>> 48320 byte marker (varies depending on attempt;
	>> reproduced with the same file uploaded several
	>> times.
	>>
	>> We have not verified this yet using stock Tomcat
	>> (4.1.29) and the stock doc upload servlet.
	>>
	>> Is there some sort of new configuration that is
	>> needed
	>>
	>> to accompany this point release of mod_jk2?
	>>
	>> thanks,
	>> e
	>>
	>>
	>>
	>>
	>> __________________________________
	>> Do you Yahoo!?
	>> Yahoo! Finance Tax Center - File online. File on
	>> time.
	>> http://taxes.yahoo.com/filing.html
	>>
	>>
	>---------------------------------------------------------------------
	>> To unsubscribe, e-mail:
	>> tomcat-user-unsubscribe@jakarta.apache.org
	>> For additional commands, e-mail:
	>> tomcat-user-help@jakarta.apache.org
	>>
	>
	>
	>__________________________________
	>Do you Yahoo!?
	>Yahoo! Small Business $15K Web Design Giveaway
	>http://promotions.yahoo.com/design_giveaway/
	>
	>---------------------------------------------------------------------
	>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
	>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
	
	
	
	
	This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.
	
	
	---------------------------------------------------------------------
	To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
	For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
	
	



<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>

Mime
View raw message