mirror of https://github.com/fafhrd91/actix-web
fix http encoding
This commit is contained in:
parent
4671bb247d
commit
97d3f8cb30
|
@ -516,11 +516,11 @@ impl ClientRequest {
|
||||||
.unwrap_or(true);
|
.unwrap_or(true);
|
||||||
|
|
||||||
if https {
|
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 {
|
} 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"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue