Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use idenity encoding on client if no compression features are enabled #1737

11 changes: 10 additions & 1 deletion awc/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,17 @@ use crate::ClientConfig;

#[cfg(any(feature = "flate2-zlib", feature = "flate2-rust"))]
const HTTPS_ENCODING: &str = "br, gzip, deflate";
#[cfg(not(any(feature = "flate2-zlib", feature = "flate2-rust")))]
#[cfg(all(
not(any(feature = "flate2-zlib", feature = "flate2-rust")),
feature = "compress"
))]
const HTTPS_ENCODING: &str = "br";
#[cfg(not(any(
feature = "flate2-zlib",
feature = "flate2-rust",
feature = "compress"
)))]
const HTTPS_ENCODING: &str = "identity";
robjtede marked this conversation as resolved.
Show resolved Hide resolved

/// An HTTP Client request builder
///
Expand Down