You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/12/17 20:25:46 UTC

DO NOT REPLY [Bug 25598] New: - MultipartStream\IE 5.5 error.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25598>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25598

MultipartStream\IE 5.5 error.

           Summary: MultipartStream\IE 5.5 error.
           Product: Commons
           Version: 1.0 Final
          Platform: Sun
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: File Upload
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: robert.priest@bentley.com


This was found in IE 5.5 SP2 using 
commons-fileupload-1.0.jar (built on 12/17/2003  11:44a).

The MultipartStream is throwing a "Stream ended unexpectedly error" in  IE 5.5. 
It works fine in IE 6. It is the same code.

The error is being generated from following code in 
org.apache.commons.fileupload.MultipartStream:

public int readBodyData(OutputStream output)
        throws MalformedStreamException,
               IOException
....
               head = 0;
                bytesRead = input.read(buffer, pad, bufSize - pad); //
(robert.priest says: this is returning -1 = end of file reached)

                // [pprrrrrrr]
                if (bytesRead != -1)
                {
                 ...
                }
	   else
                {
                    // The last pad amount is left in the buffer.
                    // Boundary can't be in there so write out the
                    // data you have and signal an error condition.
                    output.write(buffer, 0, pad);
                    output.flush();
                    total += pad;
                    throw new MalformedStreamException(
                            "Stream ended unexpectedly");
                }
            }
        }



Is there something different in the form generation of IE 5.5. vs IE 6.0 that 
is causing this issue?

Is it possible the pad value is off in the input.read(buffer, pad, bufSize - 
pad);  call?

Any help would be appreciated. If need be, I can create a test package and ship 
it to you...




The following is the error I see in my logs:

NDC:			
Category:	com.projectwise.web.server.lite.LiteServlet
Message:		Problem reading multipart file request
Location:	
Thrown:
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-
data request failed. Stream ended unexpectedly
	at org.apache.commons.fileupload.FileUploadBase.parseRequest
(FileUploadBase.java:429)

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org