1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-19 20:35:36 +02:00

update set_date impl

This commit is contained in:
Nikolay Kim
2018-06-23 10:13:09 +06:00
parent 4fadff63f4
commit 756227896b
3 changed files with 17 additions and 17 deletions

View File

@@ -73,7 +73,7 @@ impl<H: 'static> Writer for H2Writer<H> {
#[inline]
fn set_date(&self, dst: &mut BytesMut) {
self.settings.set_date(dst)
self.settings.set_date(dst, true)
}
#[inline]
@@ -97,7 +97,7 @@ impl<H: 'static> Writer for H2Writer<H> {
// using helpers::date is quite a lot faster
if !msg.headers().contains_key(DATE) {
let mut bytes = BytesMut::with_capacity(29);
self.settings.set_date_simple(&mut bytes);
self.settings.set_date(&mut bytes, false);
msg.headers_mut()
.insert(DATE, HeaderValue::try_from(bytes.freeze()).unwrap());
}