PR #12208 - changes from review

Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
This commit is contained in:
Lachlan Roberts 2024-09-02 12:01:02 +10:00
parent 96a0468436
commit 4164ab782b
No known key found for this signature in database
GPG Key ID: 5663FB7A8FF7E348
1 changed files with 3 additions and 8 deletions

View File

@ -62,7 +62,6 @@ import jakarta.servlet.descriptor.JspPropertyGroupDescriptor;
import jakarta.servlet.descriptor.TaglibDescriptor;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSessionActivationListener;
import jakarta.servlet.http.HttpSessionAttributeListener;
import jakarta.servlet.http.HttpSessionBindingListener;
@ -1191,13 +1190,9 @@ public class ServletContextHandler extends ContextHandler
protected boolean handleByContextHandler(String pathInContext, ContextRequest request, Response response, Callback callback)
{
boolean initialDispatch = request instanceof ServletContextRequest;
if (initialDispatch && isProtectedTarget(pathInContext))
{
Response.writeError(request, response, callback, HttpServletResponse.SC_NOT_FOUND, null);
return true;
}
if (!initialDispatch)
return false;
return super.handleByContextHandler(pathInContext, request, response, callback);
}
@Override