Author: markt
Date: Thu Jun 18 19:55:37 2015
New Revision: 1686306
URL: http://svn.apache.org/r1686306
Log:
Add a test for zero length padding
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=1686306&r1=1686305&r2=1686306&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:55:37 2015
@@ -143,5 +143,23 @@ public class TestHttp2Section_6_1 extend
Assert.assertTrue(trace, trace.startsWith("0-Goaway-[1]-[1]-["));
}
- // TODO: Remainder if section 6.1 tests
+
+ @Test
+ public void testDataFrameWithZeroLengthPadding() throws Exception {
+ http2Connect();
+
+ byte[] padding = new byte[0];
+
+ sendSimplePostRequest(3, padding);
+ // Since padding is zero length, response looks like there is none.
+ readSimplePostResponse(false);
+
+ Assert.assertEquals("0-WindowSize-[127]\n"
+ + "3-WindowSize-[127]\n"
+ + "3-HeadersStart\n"
+ + "3-Header-[:status]-[200]\n"
+ + "3-HeadersEnd\n"
+ + "3-Body-127\n"
+ + "3-EndOfStream\n", output.getTrace());
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]