1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-07-01 12:15:08 +02:00

set server response version

This commit is contained in:
Nikolay Kim
2018-11-20 11:23:05 -08:00
parent 186d3d727a
commit ab3e12f2b4
2 changed files with 6 additions and 3 deletions

View File

@ -149,6 +149,9 @@ impl Encoder for Codec {
) -> Result<(), Self::Error> {
match item {
Message::Item((mut res, length)) => {
// set response version
res.head_mut().version = self.version;
// connection status
self.ctype = if let Some(ct) = res.head().ctype {
if ct == ConnectionType::KeepAlive {