You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2001/09/21 01:34:42 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets InvokerServlet.java

remm        01/09/20 16:34:42

  Modified:    catalina/src/share/org/apache/catalina/servlets
                        InvokerServlet.java
  Log:
  - Fix for bug 3736. Tricky bug caused by using the invoker servlet ....
  
  Revision  Changes    Path
  1.14      +12 -4     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java
  
  Index: InvokerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- InvokerServlet.java	2001/08/24 23:19:06	1.13
  +++ InvokerServlet.java	2001/09/20 23:34:42	1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v 1.13 2001/08/24 23:19:06 craigmcc Exp $
  - * $Revision: 1.13 $
  - * $Date: 2001/08/24 23:19:06 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v 1.14 2001/09/20 23:34:42 remm Exp $
  + * $Revision: 1.14 $
  + * $Date: 2001/09/20 23:34:42 $
    *
    * ====================================================================
    *
  @@ -87,7 +87,7 @@
    * in the web application deployment descriptor.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.13 $ $Date: 2001/08/24 23:19:06 $
  + * @version $Revision: 1.14 $ $Date: 2001/09/20 23:34:42 $
    */
   
   public final class InvokerServlet
  @@ -273,6 +273,7 @@
           String inPathInfo = null;
           boolean included =
               (request.getAttribute(Globals.REQUEST_URI_ATTR) != null);
  +
           if (included) {
               inRequestURI =
                   (String) request.getAttribute(Globals.REQUEST_URI_ATTR);
  @@ -422,6 +423,13 @@
               context.removeChild(wrapper);
               throw new ServletException
                   (sm.getString("invokerServlet.allocate", inRequestURI), e);
  +        }
  +
  +        // After loading the wrapper, restore some of the fields when including
  +        if (included) {
  +            wrequest.setRequestURI(request.getRequestURI());
  +            wrequest.setPathInfo(request.getPathInfo());
  +            wrequest.setServletPath(request.getServletPath());
           }
   
           // Invoke the service() method of the allocated servlet