1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 00:44:26 +02:00

remove actix_http::http module (#2488)

This commit is contained in:
Rob Ede
2021-12-05 14:37:20 +00:00
committed by GitHub
parent 59be0c65c6
commit 2d053b7036
57 changed files with 209 additions and 234 deletions

View File

@ -23,7 +23,7 @@ use zstd::stream::write::Decoder as ZstdDecoder;
use crate::{
encoding::Writer,
error::{BlockingError, PayloadError},
http::header::{ContentEncoding, HeaderMap, CONTENT_ENCODING},
header::{ContentEncoding, HeaderMap, CONTENT_ENCODING},
};
const MAX_CHUNK_SIZE_DECODE_IN_PLACE: usize = 2049;

View File

@ -27,11 +27,8 @@ use super::Writer;
use crate::{
body::{BodySize, MessageBody},
error::BlockingError,
http::{
header::{ContentEncoding, CONTENT_ENCODING},
HeaderValue, StatusCode,
},
ResponseHead,
header::{self, ContentEncoding, HeaderValue, CONTENT_ENCODING},
ResponseHead, StatusCode,
};
const MAX_CHUNK_SIZE_ENCODE_IN_PLACE: usize = 1024;
@ -222,7 +219,7 @@ where
fn update_head(encoding: ContentEncoding, head: &mut ResponseHead) {
head.headers_mut().insert(
CONTENT_ENCODING,
header::CONTENT_ENCODING,
HeaderValue::from_static(encoding.as_str()),
);
}