Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

treat application/wasm as a binary document type

BibekPathakb698e6288284
diff --git a/moli-web-mime/src/classification.rs b/moli-web-mime/src/classification.rs
index 2322ec9ac..3ff3a0dd5 100644
--- a/moli-web-mime/src/classification.rs
+++ b/moli-web-mime/src/classification.rs
@@ -184,5 +184,6 @@ pub fn is_binary_document_mime_type(input: &str) -> bool {
| "application/x-rar-compressed"
| "application/x-tar"
| "application/zip"
+ | "application/wasm"
)
}
diff --git a/moli-web-mime/src/tests.rs b/moli-web-mime/src/tests.rs
index 418cd384d..db5977c71 100644
--- a/moli-web-mime/src/tests.rs
+++ b/moli-web-mime/src/tests.rs
@@ -131,6 +131,10 @@ fn classifies_binary_main_document_headers() {
"Content-Disposition".to_owned(),
"attachment; filename=report.html".to_owned(),
)]));
+ assert!(response_headers_indicate_raw_document(&[(
+ "Content-Type".to_owned(),
+ "application/wasm".to_owned(),
+ )]));
assert!(!response_headers_indicate_raw_document(&[(
"Content-Type".to_owned(),
"text/html; charset=utf-8".to_owned(),