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

http://issues.apache.org/bugzilla/show_bug.cgi?id=38881

           Summary: Item Iterator found empty in second pass for the same
                    request
           Product: Commons
           Version: 1.1 Final
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: File Upload
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


I am using common file upload version 1.1.

I am parsing the reqyest object twice in a servlet.  I observed that during 
first pass every thing works fine but during second pass the irerator object 
is coming as empty.

In other words it appears that you cannot parse the reqyest object for the 
second time in a single pass. In second pass it is observed that the method 
discardBodyData of MultipartStream class is throwing MalformedStreamException 
exception .

Following is the code snippet.
DiskFileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
List  items = upload.parseRequest(req);
                        
Iterator iter = items.iterator();
while (iter.hasNext()) 
{
    // do some thing
 }

I am not sure if this bug is fixed in subsequent release. If so please ignore 
this bug and let me know the details.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to