From 97d3f8cb304f1da3da9462edba3f51171ac82999 Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Fri, 26 Mar 2021 00:37:29 +0800 Subject: [PATCH] fix http encoding --- awc/src/request.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/awc/src/request.rs b/awc/src/request.rs index 97812a9c0..8b896a00d 100644 --- a/awc/src/request.rs +++ b/awc/src/request.rs @@ -516,11 +516,11 @@ impl ClientRequest { .unwrap_or(true); if https { - slf = slf.insert_header_if_none((header::ACCEPT_ENCODING, HTTPS_ENCODING)) + slf = slf.insert_header_if_none((header::ACCEPT_ENCODING, HTTPS_ENCODING)); } else { - #[cfg(any(feature = "flate2-zlib", feature = "flate2-rust"))] + #[cfg(feature = "compress")] { - slf = slf.insert_header_if_none((header::ACCEPT_ENCODING, "gzip, deflate")) + slf = slf.insert_header_if_none((header::ACCEPT_ENCODING, "gzip, deflate")); } }; }