This commit ensures that when using `sendRedirect`, the response wrapper behaves correctly with regards to the Servlet specification: 1. reset the response buffer to clear any partially written response 2. set the expected response HTTP headers 3. flush the buffer to commit the response Closes gh-29050