Author: markt
Date: Fri Jul  4 20:35:37 2014
New Revision: 1607936

URL: http://svn.apache.org/r1607936
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/tc7.0.x/trunk/   (props changed)
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1607930-1607931

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

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1607936&r1=1607935&r2=1607936&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Jul  4 20:35:37 2014
@@ -135,6 +135,12 @@
         <code>HttpServletRequest.getServletContext()</code> returns the correct
         value during a cross-context dispatch. (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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to