1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-28 02:49:02 +02:00

use objects pool for HttpRequest; optimize nested services call

This commit is contained in:
Nikolay Kim
2019-04-07 23:06:21 -07:00
parent 75b213a6f0
commit aa78565453
20 changed files with 343 additions and 295 deletions

View File

@ -104,9 +104,8 @@ where
let (parts, body) = resp.into_parts();
let payload = if head_req { Payload::None } else { body.into() };
let mut head = ResponseHead::default();
let mut head = ResponseHead::new(parts.status);
head.version = parts.version;
head.status = parts.status;
head.headers = parts.headers.into();
Ok((head, payload))

View File

@ -21,6 +21,7 @@ use tokio_timer::{sleep, Delay};
use super::connection::{ConnectionType, IoConnection};
use super::error::ConnectError;
#[allow(dead_code)]
#[derive(Clone, Copy, PartialEq)]
pub enum Protocol {
Http1,