aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/http2_interop/s6.5.go
diff options
context:
space:
mode:
authorGravatar Carl Mastrangelo <notcarl@google.com>2015-12-01 16:19:23 -0800
committerGravatar Carl Mastrangelo <notcarl@google.com>2015-12-03 12:37:30 -0800
commit368a304c940e5379935aa828f3f30d17d7a29fbb (patch)
treebcc439679d6660c0026589f4251269615832540b /tools/http2_interop/s6.5.go
parentf7abb65c37bb114bc73e54bf46b11066a29f545b (diff)
Add http2 test for small http max frame size
Diffstat (limited to 'tools/http2_interop/s6.5.go')
-rw-r--r--tools/http2_interop/s6.5.go33
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/http2_interop/s6.5.go b/tools/http2_interop/s6.5.go
new file mode 100644
index 0000000000..8145b6e031
--- /dev/null
+++ b/tools/http2_interop/s6.5.go
@@ -0,0 +1,33 @@
+package http2interop
+
+import (
+ "time"
+)
+
+// Section 6.5 says the minimum SETTINGS_MAX_FRAME_SIZE is 16,384
+func testSmallMaxFrameSize(ctx *HTTP2InteropCtx) error {
+ conn, err := connect(ctx)
+ if err != nil {
+ return err
+ }
+ defer conn.Close()
+ conn.Log = ctx.T.Log
+ conn.SetDeadline(time.Now().Add(defaultTimeout))
+
+ sf := &SettingsFrame{
+ Params: []SettingsParameter{{
+ Identifier: SettingsMaxFrameSize,
+ Value: 1<<14 - 1, // 1 less than the smallest maximum
+ }},
+ }
+
+ if err := http2Connect(conn, sf); err != nil {
+ return err
+ }
+
+ if _, err := expectGoAwaySoon(conn); err != nil {
+ return err
+ }
+
+ return nil
+}