Make gzip an optional feature (default off)

This commit is contained in:
Sean McArthur
2019-09-19 11:11:24 -07:00
parent f4100e4148
commit f71227d968
10 changed files with 289 additions and 195 deletions

View File

@@ -11,7 +11,9 @@ async fn auto_headers() {
assert_eq!(req.headers()["accept"], "*/*");
assert_eq!(req.headers()["user-agent"], DEFAULT_USER_AGENT);
assert_eq!(req.headers()["accept-encoding"], "gzip");
if cfg!(feature = "gzip") {
assert_eq!(req.headers()["accept-encoding"], "gzip");
}
http::Response::default()
}