mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 23:17:42 +02:00
use idenity encoding on client if no compression features are enabled (#1737)
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com> Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
@ -21,10 +21,15 @@ use crate::frozen::FrozenClientRequest;
|
||||
use crate::sender::{PrepForSendingError, RequestSender, SendClientRequest};
|
||||
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")))]
|
||||
const HTTPS_ENCODING: &str = "br";
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(any(feature = "flate2-zlib", feature = "flate2-rust"))] {
|
||||
const HTTPS_ENCODING: &str = "br, gzip, deflate";
|
||||
} else if #[cfg(feature = "compress")] {
|
||||
const HTTPS_ENCODING: &str = "br";
|
||||
} else {
|
||||
const HTTPS_ENCODING: &str = "identity";
|
||||
}
|
||||
}
|
||||
|
||||
/// An HTTP Client request builder
|
||||
///
|
||||
|
Reference in New Issue
Block a user