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

Select compression algorithm using features flags (#2250)

Add compress-* feature flags in actix-http / actix-web / awc.
This allow enable / disable not wanted compression algorithm.
This commit is contained in:
Arthur Le Moigne
2021-06-19 21:21:13 +02:00
committed by GitHub
parent c260fb1c48
commit baa5a663c4
19 changed files with 204 additions and 72 deletions

View File

@ -16,7 +16,7 @@ edition = "2018"
[package.metadata.docs.rs]
# features that docs.rs will build with
features = ["openssl", "rustls", "compress"]
features = ["openssl", "rustls", "compress-brotli", "compress-gzip", "compress-zstd"]
[lib]
name = "actix_http"
@ -32,11 +32,17 @@ openssl = ["actix-tls/openssl"]
rustls = ["actix-tls/rustls"]
# enable compression support
compress = ["flate2", "brotli2", "zstd"]
compress-brotli = ["brotli2", "__compress"]
compress-gzip = ["flate2", "__compress"]
compress-zstd = ["zstd", "__compress"]
# trust-dns as client dns resolver
trust-dns = ["trust-dns-resolver"]
# Internal (PRIVATE!) features used to aid testing and cheking feature status.
# Don't rely on these whatsoever. They may disappear at anytime.
__compress = []
[dependencies]
actix-service = "2.0.0"
actix-codec = "0.4.0"