File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ impl Builder {
240
240
h1_keep_alive : true ,
241
241
h1_title_case_headers : false ,
242
242
h1_preserve_header_case : false ,
243
- h1_header_read_timeout : Dur :: Default ( None ) ,
243
+ h1_header_read_timeout : Dur :: Default ( Some ( Duration :: from_secs ( 30 ) ) ) ,
244
244
h1_writev : None ,
245
245
max_buf_size : None ,
246
246
pipeline_flush : false ,
@@ -295,7 +295,9 @@ impl Builder {
295
295
/// Set a timeout for reading client request headers. If a client does not
296
296
/// transmit the entire header within this time, the connection is closed.
297
297
///
298
- /// Default is None.
298
+ /// Pass `None` to disable.
299
+ ///
300
+ /// Default is 30 seconds.
299
301
pub fn header_read_timeout ( & mut self , read_timeout : impl Into < Option < Duration > > ) -> & mut Self {
300
302
self . h1_header_read_timeout = Dur :: Configured ( read_timeout. into ( ) ) ;
301
303
self
You can’t perform that action at this time.
0 commit comments