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 2015/10/14 12:12:41 UTC
svn commit: r1708575 -
/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
Author: markt
Date: Wed Oct 14 10:12:41 2015
New Revision: 1708575
URL: http://svn.apache.org/viewvc?rev=1708575&view=rev
Log:
Modify behaviour for resetting streams.
Always send a reset for a stream level error on a stream that is unknown to the server since the client must have send the stream ID.
Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1708575&r1=1708574&r2=1708575&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Wed Oct 14 10:12:41 2015
@@ -408,8 +408,12 @@ public class Http2UpgradeHandler extends
Integer.toString(se.getStreamId()), se.getError()));
}
+ // If the stream is null, the server knows nothing about it. The ID can
+ // only have come from the client so always send a reset.
+ // If the stream is not null, the server does know about the stream so
+ // only send the reset if the stream is in an appropriate state.
Stream stream = getStream(se.getStreamId(), false);
- if (stream != null && stream.sendReset()) {
+ if (stream == null || stream.sendReset()) {
// Write a RST frame
byte[] rstFrame = new byte[13];
// Length
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org