You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ma...@apache.org on 2002/08/09 07:20:15 UTC

cvs commit: jakarta-struts/src/share/org/apache/struts/actions IncludeAction.java

martinc     2002/08/08 22:20:15

  Modified:    src/share/org/apache/struts/actions IncludeAction.java
  Log:
  For multipart requests, unwrap before passing to the RequestDispatcher.
  
  PR: 10641
  Submitted by: Antoni Reus
  
  Revision  Changes    Path
  1.3       +10 -4     jakarta-struts/src/share/org/apache/struts/actions/IncludeAction.java
  
  Index: IncludeAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/actions/IncludeAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IncludeAction.java	23 Jun 2002 00:52:50 -0000	1.2
  +++ IncludeAction.java	9 Aug 2002 05:20:15 -0000	1.3
  @@ -70,6 +70,7 @@
   import org.apache.struts.action.ActionForm;
   import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
  +import org.apache.struts.upload.MultipartRequestWrapper;
   import org.apache.struts.util.MessageResources;
   
   
  @@ -152,6 +153,11 @@
                   (HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                    messages.getMessage("include.rd", path));
               return (null);
  +        }
  +
  +        // Unwrap the multipart request, if there is one.
  +        if (request instanceof MultipartRequestWrapper) {
  +            request = ((MultipartRequestWrapper) request).getRequest();
           }
   
           // Forward control to the specified resource
  
  
  

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