We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
date_header
1 parent 2babc93 commit 7de0237Copy full SHA for 7de0237
src/proto/h1/conn.rs
@@ -152,6 +152,11 @@ where
152
self.state.allow_half_close = true;
153
}
154
155
+ #[cfg(feature = "server")]
156
+ pub(crate) fn disable_date_header(&mut self) {
157
+ self.state.date_header = false;
158
+ }
159
+
160
pub(crate) fn into_inner(self) -> (I, Bytes) {
161
self.io.into_inner()
162
src/server/conn/http1.rs
@@ -459,6 +459,9 @@ impl Builder {
459
if let Some(max) = self.max_buf_size {
460
conn.set_max_buf_size(max);
461
462
+ if !self.date_header {
463
+ conn.disable_date_header();
464
465
let sd = proto::h1::dispatch::Server::new(service);
466
let proto = proto::h1::Dispatcher::new(sd, conn);
467
Connection { conn: proto }
0 commit comments