@@ -51,6 +51,7 @@ const DEFAULT_CONN_WINDOW: u32 = 1024 * 1024 * 5; // 5mb
51
51
const DEFAULT_STREAM_WINDOW : u32 = 1024 * 1024 * 2 ; // 2mb
52
52
const DEFAULT_MAX_FRAME_SIZE : u32 = 1024 * 16 ; // 16kb
53
53
const DEFAULT_MAX_SEND_BUF_SIZE : usize = 1024 * 1024 ; // 1mb
54
+ const DEFAULT_MAX_HEADER_LIST_SIZE : u32 = 16 << 20 ; // 16mb
54
55
55
56
// The maximum number of concurrent streams that the client is allowed to open
56
57
// before it receives the initial SETTINGS frame from the server.
@@ -68,6 +69,7 @@ pub(crate) struct Config {
68
69
pub ( crate ) initial_stream_window_size : u32 ,
69
70
pub ( crate ) initial_max_send_streams : usize ,
70
71
pub ( crate ) max_frame_size : u32 ,
72
+ pub ( crate ) max_header_list_size : u32 ,
71
73
pub ( crate ) keep_alive_interval : Option < Duration > ,
72
74
pub ( crate ) keep_alive_timeout : Duration ,
73
75
pub ( crate ) keep_alive_while_idle : bool ,
@@ -84,6 +86,7 @@ impl Default for Config {
84
86
initial_stream_window_size : DEFAULT_STREAM_WINDOW ,
85
87
initial_max_send_streams : DEFAULT_INITIAL_MAX_SEND_STREAMS ,
86
88
max_frame_size : DEFAULT_MAX_FRAME_SIZE ,
89
+ max_header_list_size : DEFAULT_MAX_HEADER_LIST_SIZE ,
87
90
keep_alive_interval : None ,
88
91
keep_alive_timeout : Duration :: from_secs ( 20 ) ,
89
92
keep_alive_while_idle : false ,
@@ -101,6 +104,7 @@ fn new_builder(config: &Config) -> Builder {
101
104
. initial_window_size ( config. initial_stream_window_size )
102
105
. initial_connection_window_size ( config. initial_conn_window_size )
103
106
. max_frame_size ( config. max_frame_size )
107
+ . max_header_list_size ( config. max_header_list_size )
104
108
. max_send_buffer_size ( config. max_send_buffer_size )
105
109
. enable_push ( false ) ;
106
110
if let Some ( max) = config. max_concurrent_reset_streams {
0 commit comments