mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-03-01 10:59:16 +00:00
The issue turned out to be that OpenSAML first sends two HEAD requests before sending a GET to retrieve the metadata. The way the MockWebServer dispatcher was configured, it would send back the metadata on each request. This created a situation where sockets were being closed by the client before the server had sent all the response, resulting in a broken pipe. The tests would succeed most of the time due to lucky timing between the client closing the socket and the server having sent all of its (unrequested) data. This version sends an expected HEAD response when requested. Issue gh-15395