struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39316] New: - CommonsMultipartRequestHandler will lose parameters when a uploading file is too big
Date Fri, 14 Apr 2006 18:19:05 GMT
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: wshao@perpetual.com


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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message