Skip to content

Commit

Permalink
465700 NullPointerException in ResourceHandler with welcome files
Browse files Browse the repository at this point in the history
  • Loading branch information
janbartel committed Apr 29, 2015
1 parent d7de34a commit 25474ff
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -447,7 +447,9 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques
// handle directories
if (resource.isDirectory())
{
if (!request.getPathInfo().endsWith(URIUtil.SLASH))
String pathInfo = request.getPathInfo();
boolean endsWithSlash=(pathInfo==null?request.getServletPath():pathInfo).endsWith(URIUtil.SLASH);
if (!endsWithSlash)
{
response.sendRedirect(response.encodeRedirectURL(URIUtil.addPaths(request.getRequestURI(),URIUtil.SLASH)));
return;
Expand Down

0 comments on commit 25474ff

Please sign in to comment.