Skip to content

Commit 4a6f4f3

Browse files
committed
Add ignore_invalid_headers.
1 parent 530e159 commit 4a6f4f3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/server/conn/auto/mod.rs

+12
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,18 @@ impl<E> Http1Builder<'_, E> {
671671
self
672672
}
673673

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+
674686
/// Set whether to support preserving original header cases.
675687
///
676688
/// Currently, this will record the original cases received, and store them

0 commit comments

Comments
 (0)