Author: markt
Date: Fri Feb 1 11:10:53 2019
New Revision: 1852715
URL: http://svn.apache.org/viewvc?rev=1852715&view=rev
Log:
Correct back-port
Modified:
tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Stream.java
Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Stream.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Stream.java?rev=1852715&r1=1852714&r2=1852715&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Stream.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/Stream.java Fri Feb 1
11:10:53 2019
@@ -1051,11 +1051,23 @@ public class Stream extends AbstractStre
if (log.isDebugEnabled()) {
log.debug(sm.getString("stream.inputBuffer.empty"));
}
- inBuffer.wait();
+
+
inBuffer.wait(handler.getProtocol().getStreamReadTimeout());
+
if (resetReceived) {
// TODO: i18n
throw new IOException("HTTP/2 Stream reset");
}
+
+ if (inBuffer.position() == 0) {
+ String msg =
sm.getString("stream.inputBuffer.readTimeout");
+ StreamException se = new StreamException(
+ msg, Http2Error.ENHANCE_YOUR_CALM,
getIdAsInt());
+ // Trigger a reset once control returns to Tomcat
+ coyoteResponse.setError();
+ streamOutputBuffer.reset = se;
+ throw new CloseNowException(msg, se);
+ }
} catch (InterruptedException e) {
// Possible shutdown / rst or similar. Use an
// IOException to signal to the client that further I/O
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]