Details
Description
Not 100% sure if this is a bug or not.
The spec is not 100% clear, but my reading suggests that the behaviour of Response.sendRedirect is incorrect.
The attached test shows that it is possible to change the response after calling sendRedirect.
SRV.5.3 suggests that should not be allowed:
"These methods will have the side effect of committing the response, if it has not already been committed, and terminating it. No further output to the client should be made by the servlet after these methods are called. If data is written to the response after these methods are called, the data is ignored."
However the javadoc says "After using this method, the response should be considered to be committed and should not be written to." which implies it might not be the container's job to enforce that the response is unchanged.