[package]
name = "tower-http"
description = "Tower middleware and utilities for HTTP clients and servers"
version = "0.5.2"
authors = ["Tower Maintainers <team@tower-rs.com>"]
edition = "2018"
license = "MIT"
readme = "../README.md"
repository = "https://github.com/tower-rs/tower-http"
homepage = "https://github.com/tower-rs/tower-http"
categories = ["asynchronous", "network-programming", "web-programming"]
keywords = ["io", "async", "futures", "service", "http"]
rust-version = "1.66"
[dependencies]
bitflags = "2.0.2"
bytes = "1"
http = "1.0"
http-body = "1.0.0"
http-body-util = "0.1.0"
pin-project-lite = "0.2.7"
tower-layer = "0.3"
tower-service = "0.3"
async-compression = { version = "0.4", optional = true, features = ["tokio"] }
base64 = { version = "0.21", optional = true }
futures-core = { version = "0.3", optional = true, default_features = false }
futures-util = { version = "0.3.14", optional = true, default_features = false }
http-range-header = { version = "0.4.0", optional = true }
iri-string = { version = "0.7.0", optional = true }
mime = { version = "0.3.17", optional = true, default_features = false }
mime_guess = { version = "2", optional = true, default_features = false }
percent-encoding = { version = "2.1.0", optional = true }
tokio = { version = "1.6", optional = true, default_features = false }
tokio-util = { version = "0.7", optional = true, default_features = false, features = ["io"] }
tower = { version = "0.4.1", optional = true }
tracing = { version = "0.1", default_features = false, optional = true }
httpdate = { version = "1.0", optional = true }
uuid = { version = "1.0", features = ["v4"], optional = true }
[dev-dependencies]
async-trait = "0.1"
brotli = "3"
bytes = "1"
flate2 = "1.0"
futures-util = "0.3.14"
hyper-util = { version = "0.1", features = ["client-legacy", "http1", "tokio"] }
once_cell = "1"
serde_json = "1.0"
sync_wrapper = "0.1.1"
tokio = { version = "1", features = ["full"] }
tower = { version = "0.4.10", features = ["buffer", "util", "retry", "make", "timeout"] }
tracing-subscriber = "0.3"
uuid = { version = "1.0", features = ["v4"] }
zstd = "0.12"
[features]
default = []
full = [
"add-extension",
"auth",
"catch-panic",
"compression-full",
"cors",
"decompression-full",
"follow-redirect",
"fs",
"limit",
"map-request-body",
"map-response-body",
"metrics",
"normalize-path",
"propagate-header",
"redirect",
"request-id",
"sensitive-headers",
"set-header",
"set-status",
"timeout",
"trace",
"util",
"validate-request",
]
add-extension = []
auth = ["base64", "validate-request"]
catch-panic = ["tracing", "futures-util/std"]
cors = []
follow-redirect = ["futures-util", "iri-string", "tower/util"]
fs = ["futures-util", "tokio/fs", "tokio-util/io", "tokio/io-util", "dep:http-range-header", "mime_guess", "mime", "percent-encoding", "httpdate", "set-status", "futures-util/alloc", "tracing"]
limit = []
map-request-body = []
map-response-body = []
metrics = ["tokio/time"]
normalize-path = []
propagate-header = []
redirect = []
request-id = ["uuid"]
sensitive-headers = []
set-header = []
set-status = []
timeout = ["tokio/time"]
trace = ["tracing"]
util = ["tower"]
validate-request = ["mime"]
compression-br = ["async-compression/brotli", "futures-core", "tokio-util", "tokio"]
compression-deflate = ["async-compression/zlib", "futures-core", "tokio-util", "tokio"]
compression-full = ["compression-br", "compression-deflate", "compression-gzip", "compression-zstd"]
compression-gzip = ["async-compression/gzip", "futures-core", "tokio-util", "tokio"]
compression-zstd = ["async-compression/zstd", "futures-core", "tokio-util", "tokio"]
decompression-br = ["async-compression/brotli", "futures-core", "tokio-util", "tokio"]
decompression-deflate = ["async-compression/zlib", "futures-core", "tokio-util", "tokio"]
decompression-full = ["decompression-br", "decompression-deflate", "decompression-gzip", "decompression-zstd"]
decompression-gzip = ["async-compression/gzip", "futures-core", "tokio-util", "tokio"]
decompression-zstd = ["async-compression/zstd", "futures-core", "tokio-util", "tokio"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[package.metadata.playground]
features = ["full"]
[package.metadata.cargo-public-api-crates]
allowed = [
"bytes",
"http",
"http_body",
"mime",
"tokio",
"tower",
"tower_layer",
"tower_service",
"tracing",
"tracing_core",
]