commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Priest <>
Subject [fileupload] MultipartStream\IE 5.5 error.
Date Wed, 17 Dec 2003 17:27:29 GMT

I was wondering if anyone has any experience with the following or can tell
me a little about it -

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

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

                // [pprrrrrrr]
                if (bytesRead != -1)
                    // 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);
                    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, 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:

Category:	com.projectwise.web.server.lite.LiteServlet
Message:		Problem reading multipart file request
org.apache.commons.fileupload.FileUploadException: Processing of
multipart/form-data request failed. Stream ended unexpectedly

Thanks in advance...

Robert Priest.

More Info

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message