comparison src/org/eclipse/jetty/server/handler/ResourceHandler.java @ 1013:6939226e0ac4

simplify URIUtil
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 24 Oct 2016 01:06:33 -0600
parents 32d4b569567c
children 3718afd99988
comparison
equal deleted inserted replaced
1012:8d0bdd357e6e 1013:6939226e0ac4
354 // We are going to serve something 354 // We are going to serve something
355 request.setHandled(true); 355 request.setHandled(true);
356 356
357 if (resource.isDirectory()) 357 if (resource.isDirectory())
358 { 358 {
359 if (!request.getPathInfo().endsWith(URIUtil.SLASH)) 359 if (!request.getPathInfo().endsWith("/"))
360 { 360 {
361 response.sendRedirect(response.encodeRedirectURL(URIUtil.addPaths(request.getRequestURI(),URIUtil.SLASH))); 361 response.sendRedirect(response.encodeRedirectURL(URIUtil.addPaths(request.getRequestURI(),"/")));
362 return; 362 return;
363 } 363 }
364 364
365 Resource welcome=getWelcome(resource); 365 Resource welcome=getWelcome(resource);
366 if (welcome!=null && welcome.exists()) 366 if (welcome!=null && welcome.exists())