We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e981a91 commit 503f6c3Copy full SHA for 503f6c3
src/client/conn/http1.rs
@@ -402,6 +402,19 @@ impl Builder {
402
self
403
}
404
405
+ /// Set whether HTTP/1 connections will silently ignored malformed header lines.
406
+ ///
407
+ /// If this is enabled and a header line does not start with a valid header
408
+ /// name, or does not include a colon at all, the line will be silently ignored
409
+ /// and no error will be reported.
410
411
+ /// Default is false.
412
+ pub fn ignore_invalid_headers_in_requests(&mut self, enabled: bool) -> &mut Builder {
413
+ self.h1_parser_config
414
+ .ignore_invalid_headers_in_requests(enabled);
415
+ self
416
+ }
417
+
418
/// Set whether HTTP/1 connections should try to use vectored writes,
419
/// or always flatten into a single buffer.
420
///
0 commit comments