blob: 32468abe831606f3b944aac640d37d444f579f9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
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.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
}
|