@@ -51,6 +51,7 @@ const DEFAULT_CONN_WINDOW: u32 = 1024 * 1024 * 5; // 5mb
5151const DEFAULT_STREAM_WINDOW : u32 = 1024 * 1024 * 2 ; // 2mb
5252const DEFAULT_MAX_FRAME_SIZE : u32 = 1024 * 16 ; // 16kb
5353const DEFAULT_MAX_SEND_BUF_SIZE : usize = 1024 * 1024 ; // 1mb
54+ const DEFAULT_MAX_HEADER_LIST_SIZE : u32 = 16 << 20 ; // 16mb
5455
5556// The maximum number of concurrent streams that the client is allowed to open
5657// before it receives the initial SETTINGS frame from the server.
@@ -68,6 +69,7 @@ pub(crate) struct Config {
6869 pub ( crate ) initial_stream_window_size : u32 ,
6970 pub ( crate ) initial_max_send_streams : usize ,
7071 pub ( crate ) max_frame_size : u32 ,
72+ pub ( crate ) max_header_list_size : u32 ,
7173 pub ( crate ) keep_alive_interval : Option < Duration > ,
7274 pub ( crate ) keep_alive_timeout : Duration ,
7375 pub ( crate ) keep_alive_while_idle : bool ,
@@ -84,6 +86,7 @@ impl Default for Config {
8486 initial_stream_window_size : DEFAULT_STREAM_WINDOW ,
8587 initial_max_send_streams : DEFAULT_INITIAL_MAX_SEND_STREAMS ,
8688 max_frame_size : DEFAULT_MAX_FRAME_SIZE ,
89+ max_header_list_size : DEFAULT_MAX_HEADER_LIST_SIZE ,
8790 keep_alive_interval : None ,
8891 keep_alive_timeout : Duration :: from_secs ( 20 ) ,
8992 keep_alive_while_idle : false ,
@@ -101,6 +104,7 @@ fn new_builder(config: &Config) -> Builder {
101104 . initial_window_size ( config. initial_stream_window_size )
102105 . initial_connection_window_size ( config. initial_conn_window_size )
103106 . max_frame_size ( config. max_frame_size )
107+ . max_header_list_size ( config. max_header_list_size )
104108 . max_send_buffer_size ( config. max_send_buffer_size )
105109 . enable_push ( false ) ;
106110 if let Some ( max) = config. max_concurrent_reset_streams {
0 commit comments