commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Priest <Robert.Pri...@bentley.com>
Subject RE: [fileupload] MultipartStream\IE 5.5 error.
Date Wed, 17 Dec 2003 18:06:08 GMT
Sure, no problem.

-----Original Message-----
From: Martin Cooper [mailto:martinc@apache.org]
Sent: Wednesday, December 17, 2003 12:40 PM
To: Jakarta Commons Users List
Subject: Re: [fileupload] MultipartStream\IE 5.5 error.


I have not seen that before. If you could open a bug report in Bugzilla,
that will make sure this doesn't get lost. Even better, if you could find
a way to grab what is actually on the wire when this happens, that would
be a huge help in tracking this down.

--
Martin Cooper


 On Wed, 17 Dec 2003, Robert Priest wrote:

> Hello,
>
> 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
> 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.jav
> a:429)
> ...
>
>
>
> Thanks in advance...
>
> Robert Priest.
>
> More Info
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

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

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


Mime
View raw message