diff src/org/eclipse/jetty/server/handler/ResourceHandler.java @ 997:7d28be82ab75

simplify Request
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 18 Oct 2016 22:43:17 -0600
parents 4e9d373bf6e9
children 32d4b569567c
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/handler/ResourceHandler.java	Tue Oct 18 21:22:53 2016 -0600
+++ b/src/org/eclipse/jetty/server/handler/ResourceHandler.java	Tue Oct 18 22:43:17 2016 -0600
@@ -252,8 +252,9 @@
 		_cacheControl=cacheControl==null?null:new ByteArrayBuffer(cacheControl);
 	}
 
-	private Resource getResource(Request request,String path) throws MalformedURLException
+	private Resource getResource(Request request) throws MalformedURLException
 	{
+		String path = request.getPathInfo();
 		if (path==null || !path.startsWith("/"))
 			throw new MalformedURLException(path);
 
@@ -281,32 +282,6 @@
 		return null;
 	}
 
-	private Resource getResource(Request request) throws MalformedURLException
-	{
-		String servletPath;
-		String pathInfo;
-		Boolean included = request.getAttribute(RequestDispatcher.INCLUDE_REQUEST_URI) != null;
-		if (included != null && included.booleanValue())
-		{
-			servletPath = (String)request.getAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH);
-			pathInfo = (String)request.getAttribute(RequestDispatcher.INCLUDE_PATH_INFO);
- 
-			if (servletPath == null && pathInfo == null)
-			{
-				servletPath = request.getServletPath();
-				pathInfo = request.getPathInfo();
-			}
-		}
-		else
-		{
-			servletPath = request.getServletPath();
-			pathInfo = request.getPathInfo();
-		}
-		
-		String pathInContext = URIUtil.addPaths(servletPath,pathInfo);
-		return getResource(request,pathInContext);
-	}
-
 
 	/* ------------------------------------------------------------ */
 	public String[] getWelcomeFiles()