Improved include handling of trailing / #2275

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2018-03-14 08:27:43 +11:00
parent 7374d6563d
commit a634b571b3
1 changed files with 2 additions and 2 deletions

View File

@ -225,7 +225,7 @@ public class ResourceService
String pathInContext=URIUtil.addPaths(servletPath,pathInfo);
boolean endsWithSlash=(pathInfo==null?request.getServletPath():pathInfo).endsWith(URIUtil.SLASH);
boolean endsWithSlash=(pathInfo==null?servletPath:pathInfo).endsWith(URIUtil.SLASH);
boolean checkPrecompressedVariants=_precompressedFormats.length > 0 && !endsWithSlash && !included && reqRanges==null;
HttpContent content=null;
@ -254,7 +254,7 @@ public class ResourceService
}
// Strip slash?
if (endsWithSlash && pathInContext.length()>1)
if (!included && endsWithSlash && pathInContext.length()>1)
{
String q=request.getQueryString();
pathInContext=pathInContext.substring(0,pathInContext.length()-1);