Skip to content

Commit 0d20ad8

Browse files
committed
http/h2_{connection,stream}: Update known HTTP2 settings and frames
Updated from IANA registry
1 parent ea12beb commit 0d20ad8

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

http/h2_connection.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ local default_settings = {
3333
[known_settings.INITIAL_WINDOW_SIZE] = 65535;
3434
[known_settings.MAX_FRAME_SIZE] = 16384;
3535
[known_settings.MAX_HEADER_LIST_SIZE] = math.huge;
36+
[known_settings.SETTINGS_ENABLE_CONNECT_PROTOCOL] = false;
37+
[known_settings.TLS_RENEG_PERMITTED] = 0;
3638
}
3739

3840
local function merge_settings(tbl, new)

http/h2_stream.lua

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,19 @@ end
1919

2020
local MAX_HEADER_BUFFER_SIZE = 400*1024 -- 400 KB is max size in h2o
2121

22-
local known_settings = {
22+
local known_settings = {}
23+
for i, s in pairs({
2324
[0x1] = "HEADER_TABLE_SIZE";
2425
[0x2] = "ENABLE_PUSH";
2526
[0x3] = "MAX_CONCURRENT_STREAMS";
2627
[0x4] = "INITIAL_WINDOW_SIZE";
2728
[0x5] = "MAX_FRAME_SIZE";
2829
[0x6] = "MAX_HEADER_LIST_SIZE";
29-
}
30-
for i=0x1, 0x6 do
31-
known_settings[known_settings[i]] = i
30+
[0x8] = "SETTINGS_ENABLE_CONNECT_PROTOCOL";
31+
[0x10] = "TLS_RENEG_PERMITTED";
32+
}) do
33+
known_settings[i] = s
34+
known_settings[s] = i
3235
end
3336

3437
local frame_types = {
@@ -42,6 +45,8 @@ local frame_types = {
4245
[0x7] = "GOAWAY";
4346
[0x8] = "WINDOW_UPDATE";
4447
[0x9] = "CONTINUATION";
48+
[0xa] = "ALTSVC";
49+
[0xc] = "ORIGIN";
4550
}
4651
for i=0x0, 0x9 do
4752
frame_types[frame_types[i]] = i

0 commit comments

Comments
 (0)