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:
@@ -6,15 +6,10 @@ use std::sync::Arc;
|
||||
use crate::body::{Body, HttpBody};
|
||||
#[cfg(feature = "http2")]
|
||||
use crate::proto::h2::server::H2Stream;
|
||||
use crate::rt::Executor;
|
||||
use crate::server::conn::spawn_all::{NewSvcTask, Watcher};
|
||||
use crate::service::HttpService;
|
||||
|
||||
/// An executor of futures.
|
||||
pub trait Executor<Fut> {
|
||||
/// Place the future into the executor to be run.
|
||||
fn execute(&self, fut: Fut);
|
||||
}
|
||||
|
||||
pub trait ConnStreamExec<F, B: HttpBody>: Clone {
|
||||
fn execute_h2stream(&mut self, fut: H2Stream<F, B>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user