RequestMatcherDelegatingWebInvocationPrivilegeEvaluator doesn't provided access to the ServletContext #10779
Labels
in: web
An issue in web modules (web, webmvc)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Describe the bug
See spring-projects/spring-boot#29564 for details.
The recently introduced
RequestMatcherDelegatingWebInvocationPrivilegeEvaluator
class creates a newFilterInvocation
in thegetDelegate
method. This invocation has aDummyRequest
which cannot provide access to theServletContext
. This means that Spring Boot'sApplicationContextRequestMatcher
cannot get theWebApplicationContext
.This feels quite similar to #10208 which was fixed by making the
WebInvocationPrivilegeEvaluator
ServletAware
.To Reproduce
Run tests from the sample application at https://github.com/jeffbswope/null-servletcontext-errorpagefilter
Expected behavior
The tests should pass
Sample
https://github.com/jeffbswope/null-servletcontext-errorpagefilter
The text was updated successfully, but these errors were encountered: