Update of /cvsroot/winstone/winstone/src/java/winstone
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6247/src/java/winstone
Modified Files:
StaticResourceServlet.java
Log Message:
fixed small bug in static servlet so that forwarding to static pages works as expected
Index: StaticResourceServlet.java
===================================================================
RCS file: /cvsroot/winstone/winstone/src/java/winstone/StaticResourceServlet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** StaticResourceServlet.java 12 Aug 2005 04:04:39 -0000 1.5
--- StaticResourceServlet.java 18 Aug 2005 02:28:11 -0000 1.6
***************
*** 88,93 ****
if (isInclude)
path = (String) request.getAttribute(INCLUDE_PATH_INFO);
- else if (isForward)
- path = (String) request.getAttribute(FORWARD_PATH_INFO);
else if (request.getPathInfo() != null)
path = request.getPathInfo();
--- 88,91 ----
***************
*** 121,130 ****
// Check we are not below the web-inf
! else if (!isInclude && isDescendant(new File(this.webRoot, "WEB-INF"), res, this.webRoot))
response.sendError(HttpServletResponse.SC_NOT_FOUND, this.resources
.getString("StaticResourceServlet.PathInvalid", path));
// Check we are not below the meta-inf
! else if (!isInclude && isDescendant(new File(this.webRoot, "META-INF"), res, this.webRoot))
response.sendError(HttpServletResponse.SC_NOT_FOUND, this.resources
.getString("StaticResourceServlet.PathInvalid", path));
--- 119,128 ----
// Check we are not below the web-inf
! else if (!isInclude && !isForward && !isDescendant(new File(this.webRoot, "WEB-INF"), res, this.webRoot))
response.sendError(HttpServletResponse.SC_NOT_FOUND, this.resources
.getString("StaticResourceServlet.PathInvalid", path));
// Check we are not below the meta-inf
! else if (!isInclude && !isForward && isDescendant(new File(this.webRoot, "META-INF"), res, this.webRoot))
response.sendError(HttpServletResponse.SC_NOT_FOUND, this.resources
.getString("StaticResourceServlet.PathInvalid", path));
|