craigmcc    02/02/15 17:09:51

  Modified:    catalina/src/share/org/apache/catalina/servlets Tag:
                        tomcat_40_branch InvokerHttpRequest.java
                        InvokerServlet.java
  Log:
  Port fix for 6480.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.1   +34 -4     
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java
  
  Index: InvokerHttpRequest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- InvokerHttpRequest.java   22 Jul 2001 20:25:11 -0000      1.3
  +++ InvokerHttpRequest.java   16 Feb 2002 01:09:51 -0000      1.3.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java,v
 1.3 2001/07/22 20:25:11 pier Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/07/22 20:25:11 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerHttpRequest.java,v
 1.3.2.1 2002/02/16 01:09:51 craigmcc Exp $
  + * $Revision: 1.3.2.1 $
  + * $Date: 2002/02/16 01:09:51 $
    *
    * ====================================================================
    *
  @@ -88,7 +88,7 @@
    * to the servlet, because a new servlet mapping will have been created.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/07/22 20:25:11 $
  + * @version $Revision: 1.3.2.1 $ $Date: 2002/02/16 01:09:51 $
    */
   
   class InvokerHttpRequest extends HttpServletRequestWrapper {
  @@ -106,6 +106,7 @@
   
           super(request);
           this.pathInfo = request.getPathInfo();
  +        this.pathTranslated = request.getPathTranslated();
           this.requestURI = request.getRequestURI();
           this.servletPath = request.getServletPath();
   
  @@ -129,6 +130,12 @@
   
   
       /**
  +     * The translated path information for this request.
  +     */
  +    protected String pathTranslated = null;
  +
  +
  +    /**
        * The request URI for this request.
        */
       protected String requestURI = null;
  @@ -161,6 +168,17 @@
   
   
       /**
  +     * Override the <code>getPathTranslated()</code> method of the
  +     * wrapped request.
  +     */
  +    public String getPathTranslated() {
  +
  +        return (this.pathTranslated);
  +
  +    }
  +
  +
  +    /**
        * Override the <code>getRequestURI()</code> method of the wrapped request.
        */
       public String getRequestURI() {
  @@ -203,6 +221,18 @@
       void setPathInfo(String pathInfo) {
   
           this.pathInfo = pathInfo;
  +
  +    }
  +
  +
  +    /**
  +     * Set the translated path info for this request.
  +     *
  +     * @param pathTranslated The new translated path info
  +     */
  +    void setPathTranslated(String pathTranslated) {
  +
  +        this.pathTranslated = pathTranslated;
   
       }
   
  
  
  
  1.13.2.2  +10 -6     
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.2.1
  retrieving revision 1.13.2.2
  diff -u -r1.13.2.1 -r1.13.2.2
  --- InvokerServlet.java       22 Sep 2001 04:15:13 -0000      1.13.2.1
  +++ InvokerServlet.java       16 Feb 2002 01:09:51 -0000      1.13.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
 1.13.2.1 2001/09/22 04:15:13 remm Exp $
  - * $Revision: 1.13.2.1 $
  - * $Date: 2001/09/22 04:15:13 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/InvokerServlet.java,v
 1.13.2.2 2002/02/16 01:09:51 craigmcc Exp $
  + * $Revision: 1.13.2.2 $
  + * $Date: 2002/02/16 01:09:51 $
    *
    * ====================================================================
    *
  @@ -87,7 +87,7 @@
    * in the web application deployment descriptor.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.13.2.1 $ $Date: 2001/09/22 04:15:13 $
  + * @version $Revision: 1.13.2.2 $ $Date: 2002/02/16 01:09:51 $
    */
   
   public final class InvokerServlet
  @@ -383,10 +383,14 @@
           sb.append("/");
           sb.append(servletClass);
           wrequest.setServletPath(sb.toString());
  -        if ((pathInfo == null) || (pathInfo.length() < 1))
  +        if ((pathInfo == null) || (pathInfo.length() < 1)) {
               wrequest.setPathInfo(null);
  -        else
  +            wrequest.setPathTranslated(null);
  +        } else {
               wrequest.setPathInfo(pathInfo);
  +            wrequest.setPathTranslated
  +                (getServletContext().getRealPath(pathInfo));
  +        }
   
           // Allocate a servlet instance to perform this request
           Servlet instance = null;
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to