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=39316>.
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=39316

           Summary: CommonsMultipartRequestHandler will lose parameters when
                    a uploading file is too big
           Product: Struts
           Version: 1.2.9
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Apps
        AssignedTo: dev@struts.apache.org
        ReportedBy: [EMAIL PROTECTED]


I am trying to implement an upload feature for our website by using struts. 
Everything works fine except when I am trying to upload a file with size bigger
than I configured in the struts-config, all the parameters get lost after struts
decides the file size is too big.  Since I am trying to redirect the user to a
page with some specific IDs, I will need some parameters to be replayed.  So I
followed this class's code and tried to see how it gets lost.  Here is wut 
happens:

in the function handleRequest(HttpServletRequest request) at line 166:
        try {
            items = upload.parseRequest(request);
        } catch (DiskFileUpload.SizeLimitExceededException e) {
            // Special handling for uploads that are too big.
            request.setAttribute(
                    MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED,
                    Boolean.TRUE);
            return;
        }

So when the class get an SizeLimitExceededException from DiskFileUpload, it will
not try to replay the rest of the parameters.  And as a result, I lost the
parameter I passed in for action class to redirect the response.  Think it
through, I feel it's a struts bug rather than a commons file upload bug. 
Because commons file upload should throw an exception when the file is too big
and struts still should replay the rest of the parameters and skip the file
parameters.

-- 
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