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/06/18 21:40:20 UTC

svn commit: r1686302 - /tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java

Author: markt
Date: Thu Jun 18 19:40:20 2015
New Revision: 1686302

URL: http://svn.apache.org/r1686302
Log:
Add a test for data frames on stream 0.

Modified:
    tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java?rev=1686302&r1=1686301&r2=1686302&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_6_1.java Thu Jun 18 19:40:20 2015
@@ -92,5 +92,29 @@ public class TestHttp2Section_6_1 extend
         Assert.assertTrue(trace, trace.startsWith("0-Goaway-[3]-[1]-["));
     }
 
+
+    @Test
+    public void testDataFrameOnStreamZero() throws Exception {
+        http2Connect();
+
+        byte[] dataFrame = new byte[10];
+
+        // Header
+        // length
+        ByteUtil.setThreeBytes(dataFrame, 0, 1);
+        // type (0 for data)
+        // flags (0)
+        // stream (0)
+        // payload (0)
+
+        os.write(dataFrame);
+        os.flush();
+
+        parser.readFrame(true);
+
+        String trace = output.getTrace();
+        Assert.assertTrue(trace, trace.startsWith("0-Goaway-[1]-[1]-["));
+    }
+
     // TODO: Remainder if section 6.1 tests
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org