Author: markt
Date: Fri Jul  4 20:16:21 2014
New Revision: 1607930

URL: http://svn.apache.org/r1607930
Log:
When the current PathInfo is modified as a result of dispatching a request, 
ensure that a call to HttpServletRequest.getPathTranslated() returns a value 
that is based on the modified PathInfo.

Modified:
    tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java?rev=1607930&r1=1607929&r2=1607930&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java Fri 
Jul  4 20:16:21 2014
@@ -435,6 +435,16 @@ class ApplicationHttpRequest extends Htt
 
 
     /**
+     * Override the <code>getPathTranslated()</code> method of the wrapped
+     * request.
+     */
+    @Override
+    public String getPathTranslated() {
+        return getServletContext().getRealPath(getPathInfo());
+    }
+
+
+    /**
      * Override the <code>getQueryString()</code> method of the wrapped
      * request.
      */

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1607930&r1=1607929&r2=1607930&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jul  4 20:16:21 2014
@@ -107,6 +107,12 @@
         entry such as a delete operation.
         (markt)
       </fix>
+      <fix>
+        When the current PathInfo is modified as a result of dispatching a
+        request, ensure that a call to
+        <code>HttpServletRequest.getPathTranslated()</code> returns a value 
that
+        is based on the modified PathInfo. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to