mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-21 13:31:46 +00:00
This commit revisits the behavior of our `MockHttpServletResponse` implementation with the javadoc clarifications applied in Servlet 6.1. Prior to this change, adding or setting an HTTP response header with a `null` name or value would not have the expected behavior: * a `null` name should have no effect instead of throwing exceptions * a `null` value when setting a header effectively removes the entry from the response headers Also, this commit ensures that `IllegalStateException` are thrown if `getWriter` is called after a previous `getOutputStream` (and vice versa). Closes gh-34467