mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 04:19:12 +00:00
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…
x
Reference in New Issue
Block a user