Affects Version/s: 220.127.116.11 CE GA10, 7.4.13 DXP U6
Fix Version/s: Master
The Javadoc for MimeResponse.reset() states:
Clears any data that exists in the buffer as well as the properties set. If the response has been committed, this method throws an IllegalStateException.
However, Liferay's implementation of this method only implements the IllegalStateException requirement. It does not clear response output and header properties:
One important reason why this problem has gone unnoticed, is because the Portlet 3.0 TCK does not properly test these requirements.
1. Deploy the attached com.liferay.faces.test.bridge.tck.main.portlet.war artifact to $LIFERAY_HOME/deploy
2. Create a page named "Test"
3. Add the portlet named "chapter6_1_3_3Tests-responseResetTest-portlet" to the page
4. Click the "Run Test" button
The portlet renders a success message:
The portlet renders a failure message: