Use Accept-Encoding=idenity if no compression feature is enabled (#1731)

This commit is contained in:
j-brn 2020-10-16 19:14:03 +02:00
parent d765e9099d
commit 7811292678
1 changed files with 10 additions and 1 deletions

View File

@ -23,8 +23,17 @@ use crate::ClientConfig;
#[cfg(any(feature = "flate2-zlib", feature = "flate2-rust"))] #[cfg(any(feature = "flate2-zlib", feature = "flate2-rust"))]
const HTTPS_ENCODING: &str = "br, gzip, deflate"; 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"; const HTTPS_ENCODING: &str = "br";
#[cfg(not(any(
feature = "flate2-zlib",
feature = "flate2-rust",
feature = "compress"
)))]
const HTTPS_ENCODING: &str = "identity";
/// An HTTP Client request builder /// An HTTP Client request builder
/// ///