Description
Related to #6220
SecurityContextHolderAwareRequestFilter
contains a condition which returns a different HttpServletRequestFactory
based on whether the application is using Servlet Spec 3 or higher.
To support this, there are two request factories, one for servlet 2.5 called HttpServlet25RequestFactory
and another called HttpServlet3RequestFactory
.
These exist in order to expose additional features in Servlet 3, and also to return a version-specific implementation of SecurityContextHolderAwareRequestWrapper
.
Since Spring Framework 5.x has a baseline of Servlet Spec 3.1, the if condition, and HttpServlet25RequestFactory
are no longer necessary and we should remove them.
For now, we shouldn't move Servlet3SecurityContextHolderAwareRequestWrapper
's functionality up into SecurityContextHolderAwareRequestWrapper
since it is reliant on private state in HttpServlet3RequestFactory
.