bug 325072 include to DefaultServlet to a missing file must throw FileNotFoundException
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2271 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
f815555349
commit
9fb29c9dae
|
@ -31,6 +31,7 @@ jetty-7.2-SNAPSHOT
|
|||
+ 324679 Allow filter to write before static content
|
||||
+ 324811 NPE in Server.dump
|
||||
+ 324812 restore WebAppContext constructor used by geronimo integration
|
||||
+ 325072 include to DefaultServlet of missing file throws FileNotFoundException
|
||||
+ JETTY-912 added per exchange timeout api
|
||||
+ JETTY-1245 Do not use direct buffers with NIO SSL
|
||||
+ JETTY-1249 Apply max idle time to all connectors
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
package org.eclipse.jetty.servlet;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
@ -457,7 +458,11 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
|
|||
|
||||
// Handle resource
|
||||
if (resource==null || !resource.exists())
|
||||
response.sendError(HttpServletResponse.SC_NOT_FOUND);
|
||||
if (included) {
|
||||
throw new FileNotFoundException("Nothing at " + pathInContext);
|
||||
} else {
|
||||
response.sendError(HttpServletResponse.SC_NOT_FOUND);
|
||||
}
|
||||
else if (!resource.isDirectory())
|
||||
{
|
||||
if (endsWithSlash && _contextHandler.isAliases() && pathInContext.length()>1)
|
||||
|
|
Loading…
Reference in New Issue