feat(http1): Make HTTP/1 support an optional feature
cc #2251 BREAKING CHANGE: This puts all HTTP/1 methods and support behind an `http1` cargo feature, which will not be enabled by default. To use HTTP/1, add `features = ["http1"]` to the hyper dependency in your `Cargo.toml`.
This commit is contained in:
@@ -9,12 +9,14 @@ use bytes::BytesMut;
|
||||
use http::header::{self, Entry, HeaderName, HeaderValue};
|
||||
use http::{HeaderMap, Method, StatusCode, Version};
|
||||
|
||||
use crate::body::DecodedLength;
|
||||
use crate::common::date;
|
||||
use crate::error::Parse;
|
||||
use crate::headers;
|
||||
use crate::proto::h1::{
|
||||
date, Encode, Encoder, Http1Transaction, ParseContext, ParseResult, ParsedMessage,
|
||||
Encode, Encoder, Http1Transaction, ParseContext, ParseResult, ParsedMessage,
|
||||
};
|
||||
use crate::proto::{BodyLength, DecodedLength, MessageHead, RequestHead, RequestLine};
|
||||
use crate::proto::{BodyLength, MessageHead, RequestHead, RequestLine};
|
||||
|
||||
const MAX_HEADERS: usize = 100;
|
||||
const AVERAGE_HEADER_SIZE: usize = 30; // totally scientific
|
||||
|
||||
Reference in New Issue
Block a user