This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push: new f1bb690 Throw IOE rather than ISE if application tries to write to closed stream f1bb690 is described below commit f1bb69036d2bdf5faca83493e7b2deb2cb6edf33 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Mar 9 09:52:49 2022 +0000 Throw IOE rather than ISE if application tries to write to closed stream --- java/org/apache/coyote/http2/Stream.java | 2 +- webapps/docs/changelog.xml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/java/org/apache/coyote/http2/Stream.java b/java/org/apache/coyote/http2/Stream.java index ed5da75..03eaf43 100644 --- a/java/org/apache/coyote/http2/Stream.java +++ b/java/org/apache/coyote/http2/Stream.java @@ -839,7 +839,7 @@ class Stream extends AbstractNonZeroStream implements HeaderEmitter { @Override public final synchronized int doWrite(ByteBuffer chunk) throws IOException { if (closed) { - throw new IllegalStateException( + throw new IOException ( sm.getString("stream.closed", getConnectionId(), getIdAsString())); } // chunk is always fully written diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 3fff64f..fe26044 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -141,6 +141,12 @@ processing to wait, and potentially timeout, waiting for additional data when the full request has been received. (markt) </fix> + <fix> + Throw <code>IOException</code> rather than + <code>IllegalStateException</code> when the application attempts to + write to an GHTTP/2 stream after the client has closed the stream. + (markt) + </fix> </changelog> </subsection> <subsection name="Jasper"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org