summaryrefslogtreecommitdiff
path: root/ext/http/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/http/lib.rs')
-rw-r--r--ext/http/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/http/lib.rs b/ext/http/lib.rs
index 4911c543b..1888409ba 100644
--- a/ext/http/lib.rs
+++ b/ext/http/lib.rs
@@ -65,7 +65,7 @@ use tokio::io::AsyncWriteExt;
use tokio::task::spawn_local;
use tokio_util::io::ReaderStream;
-mod compressible;
+pub mod compressible;
pub fn init() -> Extension {
Extension::builder()
@@ -542,8 +542,9 @@ async fn op_http_write_headers(
}
if headers_allow_compression {
- body_compressible =
- compressible::is_content_compressible(content_type_header);
+ body_compressible = content_type_header
+ .map(compressible::is_content_compressible)
+ .unwrap_or_default();
}
let body: Response<Body>;