Closed
Description
Based on spring-projects/spring-security#7224 (comment) by @rwinch:
There appears to be an issue with MockMvc not allowing multiple Threads to operate on the headers at the same time. It happens in Spring Security because the
HeaderWriterFilter
will attempt to write the headers when it completes and just before the response is committed.I pushed a branch named nosecurity that reproduces the issue without Spring Security being used to demonstrate the issue is in MockMvc rather than Spring Security.