You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2019/03/08 17:52:45 UTC
[tomcat] branch 8.5.x updated: Check stream state after wait
This is an automated email from the ASF dual-hosted git repository.
remm 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 60a3af1 Check stream state after wait
60a3af1 is described below
commit 60a3af1738879ec06fac1ecb8a149608782f7cc9
Author: remm <re...@apache.org>
AuthorDate: Fri Mar 8 18:48:45 2019 +0100
Check stream state after wait
Verify HTTP/2 stream is still writable before assuming a timeout
occurred. The reason for bad behavior is a bit unclear (I see it with
logging on and async IO), but the check is inconsistent.
# Conflicts:
# webapps/docs/changelog.xml
---
java/org/apache/coyote/http2/Stream.java | 2 +-
webapps/docs/changelog.xml | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/coyote/http2/Stream.java b/java/org/apache/coyote/http2/Stream.java
index 2facca3..065f07b 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -1135,7 +1135,7 @@ public class Stream extends AbstractStream implements HeaderEmitter {
throw new IOException(sm.getString("stream.inputBuffer.reset"));
}
- if (inBuffer.position() == 0) {
+ if (inBuffer.position() == 0 && isActive() && !isInputFinished()) {
String msg = sm.getString("stream.inputBuffer.readTimeout");
StreamException se = new StreamException(
msg, Http2Error.ENHANCE_YOUR_CALM, getIdAsInt());
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 36c3168..f36a7f0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -175,6 +175,10 @@
<bug>63223</bug>: Correctly account for push requests when tracking
currently active HTTP/2 streams. (markt)
</fix>
+ <fix>
+ Verify HTTP/2 stream is still writable before assuming a timeout
+ occurred. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="WebSocket">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org