You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/03/09 09:53:51 UTC
[tomcat] branch 8.5.x updated: Throw IOE rather than ISE if application tries to write to closed stream
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new 268dc53 Throw IOE rather than ISE if application tries to write to closed stream
268dc53 is described below
commit 268dc538581063345f41fbef9ddb387629b945ff
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 b8aa5ce..e2d7683 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -824,7 +824,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()));
}
int totalThisTime = 0;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index fed2b97..82a134f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -136,6 +136,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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org