Skip to content
Permalink
Browse files

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
  • Loading branch information...
rmaucher committed Mar 8, 2019
1 parent 2e13d46 commit 60a3af1738879ec06fac1ecb8a149608782f7cc9
Showing with 5 additions and 1 deletion.
  1. +1 −1 java/org/apache/coyote/http2/Stream.java
  2. +4 −0 webapps/docs/changelog.xml
@@ -1135,7 +1135,7 @@ public int doRead(ApplicationBufferHandler applicationBufferHandler) throws IOEx
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());
@@ -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">

0 comments on commit 60a3af1

Please sign in to comment.
You can’t perform that action at this time.