1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-19 12:25:37 +02:00

Fix http/2 date header generation

This commit is contained in:
Nikolay Kim
2018-03-20 11:40:05 -07:00
parent 978091cedb
commit c4f4cadb43
4 changed files with 10 additions and 4 deletions

View File

@@ -90,7 +90,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(&mut bytes);
self.settings.set_date_simple(&mut bytes);
msg.headers_mut().insert(DATE, HeaderValue::try_from(bytes.freeze()).unwrap());
}