Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ hyper = { version = "1.4.0", features = ["full"] }
bytes = "1"
futures-util = { version = "0.3.16", default-features = false, features = ["alloc"] }
http-body-util = "0.1.0"
tokio = { version = "1", features = ["macros", "test-util", "signal"] }
tokio = { version = "1", features = ["macros", "test-util", "signal", "net"] }
tokio-test = "0.4"
tower-test = "0.4"
pretty_env_logger = "0.5"
Expand Down
11 changes: 10 additions & 1 deletion src/server/conn/auto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,15 @@ impl<E> Builder<E> {
/// # Example
///
/// ```
/// # #[cfg(feature = "tokio")]
/// # {
/// use hyper_util::{
/// rt::TokioExecutor,
/// server::conn::auto,
/// };
///
/// auto::Builder::new(TokioExecutor::new());
/// # }
/// ```
pub fn new(executor: E) -> Self {
Self {
Expand Down Expand Up @@ -171,13 +174,16 @@ impl<E> Builder<E> {
/// # Example
///
/// ```
/// # #[cfg(feature = "tokio")]
/// # {
/// use hyper_util::{
/// rt::TokioExecutor,
/// server::conn::auto,
/// };
///
/// auto::Builder::new(TokioExecutor::new())
/// .title_case_headers(true);
/// # }
/// ```
#[cfg(feature = "http1")]
pub fn title_case_headers(mut self, enabled: bool) -> Self {
Expand All @@ -195,13 +201,16 @@ impl<E> Builder<E> {
/// # Example
///
/// ```
/// # #[cfg(feature = "tokio")]
/// # {
/// use hyper_util::{
/// rt::TokioExecutor,
/// server::conn::auto,
/// };
///
/// auto::Builder::new(TokioExecutor::new())
/// .preserve_header_case(true);
/// # }
/// ```
#[cfg(feature = "http1")]
pub fn preserve_header_case(mut self, enabled: bool) -> Self {
Expand Down Expand Up @@ -1124,7 +1133,7 @@ impl<E> Http2Builder<'_, E> {
}
}

#[cfg(test)]
#[cfg(all(feature = "tokio", test))]
mod tests {
use crate::{
rt::{TokioExecutor, TokioIo},
Expand Down