2014-07-05 0:35 GMT+04:00  <ma...@apache.org>:
> 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());

According to recent r1607935, the getServletContext() method may
return null, causing an NPE here.

> +    }
> +

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to