You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The PR 30732 which fixed the issue #30757, introduced a new property ignoreWriteAfterCommit to address the issue of liberty closing the persistent (Keep-Alive) connections if an error occurs with the IO stream when the response is already committed.
While this resolved the immediate problem, this issue aims to further refine the solution to align more closely with the tWAS behaviour of not throwing any exceptions in case if a write is attempted after the response has been committed.
Steps to Reproduce
There are a few ways to reproduce this. Here is one example:
Hit as JSP that calls HttpServletResponse#sendRedirect (scriptlet code) to another page.
The same JSP then writes out more data (via jsp:include, for instance)
Webcontainer is handling the redirect, but the response is committed (caused by the additional data written) which leads to an invalid state.
With the ignoreWriteAfterCommit property enabled, Liberty will still throw an java.io.IOException: Invalid state exception if the message was already committed and closes the stream in error state, java.io.IOException: Invalid state but will keep the persistent connection open for the next request.
The socket connection is not closed by the channel / transport.
Expected Behaviour:
Liberty to not to throw an exception and keep the persistent connection open for the next request if the message was committed, to more closely mimic the behaviour of tWAS when the ignoreCommitAfterWrite property is enabled.
Diagnostic information:
OpenLiberty Version: ALL
Affected feature(s) Any features which rely on servlet. (i.e servlet-3.1, servlet-4.0, etc)
Java Version: N/A
server.xml configuration N/A
The text was updated successfully, but these errors were encountered:
Describe the bug
The PR 30732 which fixed the issue #30757, introduced a new property ignoreWriteAfterCommit to address the issue of liberty closing the persistent (Keep-Alive) connections if an error occurs with the IO stream when the response is already committed.
While this resolved the immediate problem, this issue aims to further refine the solution to align more closely with the tWAS behaviour of not throwing any exceptions in case if a write is attempted after the response has been committed.
Steps to Reproduce
There are a few ways to reproduce this. Here is one example:
Hit as JSP that calls HttpServletResponse#sendRedirect (scriptlet code) to another page.
The same JSP then writes out more data (via jsp:include, for instance)
Webcontainer is handling the redirect, but the response is committed (caused by the additional data written) which leads to an invalid state.
With the ignoreWriteAfterCommit property enabled, Liberty will still throw an java.io.IOException: Invalid state exception if the message was already committed and closes the stream in error state, java.io.IOException: Invalid state but will keep the persistent connection open for the next request.
The socket connection is not closed by the channel / transport.
Expected Behaviour:
Liberty to not to throw an exception and keep the persistent connection open for the next request if the message was committed, to more closely mimic the behaviour of tWAS when the ignoreCommitAfterWrite property is enabled.
Diagnostic information:
OpenLiberty Version: ALL
Affected feature(s) Any features which rely on servlet. (i.e servlet-3.1, servlet-4.0, etc)
Java Version: N/A
server.xml configuration N/A
The text was updated successfully, but these errors were encountered: