465700 NullPointerException in ResourceHandler with welcome files
This commit is contained in:
parent
d7de34af76
commit
25474ff7ab
|
@ -447,7 +447,9 @@ public class ResourceHandler extends HandlerWrapper
|
|||
// 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;
|
||||
|
|
Loading…
Reference in New Issue