From 306ab015e8d5601764c7c505cd6bc90361cd4504 Mon Sep 17 00:00:00 2001 From: "Kevin (Kun) \"Kassimo\" Qian" Date: Thu, 14 Nov 2019 21:14:08 -0800 Subject: Fix remote .wasm import content type issue (#3351) --- cli/file_fetcher.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index d28ed0e26..be3b1a196 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -522,7 +522,8 @@ fn map_content_type(path: &Path, content_type: Option<&str>) -> msg::MediaType { map_js_like_extension(path, msg::MediaType::JavaScript) } "application/json" | "text/json" => msg::MediaType::Json, - "text/plain" => map_file_extension(path), + // Handle plain and possibly webassembly + "text/plain" | "application/octet-stream" => map_file_extension(path), _ => { debug!("unknown content type: {}", content_type); msg::MediaType::Unknown -- cgit v1.2.3