We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ignore_invalid_headers
1 parent 530e159 commit 4a6f4f3Copy full SHA for 4a6f4f3
src/server/conn/auto/mod.rs
@@ -671,6 +671,18 @@ impl<E> Http1Builder<'_, E> {
671
self
672
}
673
674
+ /// Set whether HTTP/1 connections will silently ignored malformed header lines.
675
+ ///
676
+ /// If this is enabled and a header line does not start with a valid header
677
+ /// name, or does not include a colon at all, the line will be silently ignored
678
+ /// and no error will be reported.
679
680
+ /// Default is false.
681
+ pub fn ignore_invalid_headers(&mut self, enabled: bool) -> &mut Self {
682
+ self.inner.http1.ignore_invalid_headers(enabled);
683
+ self
684
+ }
685
+
686
/// Set whether to support preserving original header cases.
687
///
688
/// Currently, this will record the original cases received, and store them
0 commit comments