You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/06/11 01:02:38 UTC

DO NOT REPLY [Bug 9760] New: - requestprocessor needs fix to support html:file multipart file uploads

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9760

requestprocessor needs fix to support html:file multipart file uploads

           Summary: requestprocessor needs fix to support html:file
                    multipart file uploads
           Product: Struts
           Version: 1.1 Beta 1
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: File Upload
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: hal.deadman@tallan.com


Forwarding a multipart request fails if the action the form is submitted to 
forwards to another action, or if the "input" attribute of the action that the 
form submits to is an another action. 

The problem is that the processActionForward() method does not unwrap the 
multipart request before calling doForward(). One solution would be to add this 
to processActionForward:

// Unwrap the multipart request (if any)
if (request instanceof MultipartRequestWrapper) {
request = ((MultipartRequestWrapper)request).getRequest();
}

Another solution would be to put the above code in both doForward() and 
doInclude(). That would ensure that requests are always unwrapped before the 
request dispatcher is used. You could then remove all other cases of unwrapping 
but that might break code that extends RequestProcessor.java. 

This is a pretty serious problem for anyone using the html:file tag and it's an 
extremely easy fix. This may be a duplicate of other bugs because this issue 
has been raised a few times in the past.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>