File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ http = "0.2"
28
28
http-body = " 1.0.0-rc.1"
29
29
http-body-util = { version = " 0.1.0-rc.1" , optional = true }
30
30
httpdate = " 1.0"
31
- httparse = " 1.6 "
31
+ httparse = " 1.8 "
32
32
h2 = { version = " 0.3.9" , optional = true }
33
33
itoa = " 1"
34
34
tracing = { version = " 0.1" , default-features = false , features = [" std" ] }
Original file line number Diff line number Diff line change @@ -390,6 +390,24 @@ impl Builder {
390
390
self
391
391
}
392
392
393
+ /// Set whether HTTP/1 connections will silently ignored malformed header lines.
394
+ ///
395
+ /// If this is enabled and and a header line does not start with a valid header
396
+ /// name, or does not include a colon at all, the line will be silently ignored
397
+ /// and no error will be reported.
398
+ ///
399
+ /// Note that this setting does not affect HTTP/2.
400
+ ///
401
+ /// Default is false.
402
+ pub fn http1_ignore_invalid_headers_in_responses (
403
+ & mut self ,
404
+ enabled : bool ,
405
+ ) -> & mut Builder {
406
+ self . h1_parser_config
407
+ . ignore_invalid_headers_in_responses ( enabled) ;
408
+ self
409
+ }
410
+
393
411
/// Set whether HTTP/1 connections should try to use vectored writes,
394
412
/// or always flatten into a single buffer.
395
413
///
You can’t perform that action at this time.
0 commit comments