diff options
author | Aurélien Bertron <aurelien.bertron@stormshield.eu> | 2020-03-06 17:31:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-06 11:31:22 -0500 |
commit | 5e31b96f9ab72b9a9b480fd2fc0669a7f90cca17 (patch) | |
tree | fee1b8fc7a2414518513abf87bc66515f215709b | |
parent | acf0958e940f8c668c9f34dc780da48d8963a1e7 (diff) |
Add content type for wasm, fix encoding in wasm test fixture (#4269)
-rw-r--r-- | cli/file_fetcher.rs | 1 | ||||
-rw-r--r-- | cli/tests/055_import_wasm_via_network.ts.out | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | cli/tests/055_import_wasm_via_network.wasm | bin | 334 -> 97 bytes |
3 files changed, 2 insertions, 1 deletions
diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index 317850113..c3a576df5 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -529,6 +529,7 @@ 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, + "application/wasm" => msg::MediaType::Wasm, // Handle plain and possibly webassembly "text/plain" | "application/octet-stream" => map_file_extension(path), _ => { diff --git a/cli/tests/055_import_wasm_via_network.ts.out b/cli/tests/055_import_wasm_via_network.ts.out index 586dfd3ff..4c3589e02 100644 --- a/cli/tests/055_import_wasm_via_network.ts.out +++ b/cli/tests/055_import_wasm_via_network.ts.out @@ -1 +1 @@ -{ __data_end, __dso_handle, __global_base, __heap_base, __wasm_call_ctors, add, memory } +{ add_one: [Function: 0], memory: Memory {} } diff --git a/cli/tests/055_import_wasm_via_network.wasm b/cli/tests/055_import_wasm_via_network.wasm Binary files differindex f3be5b237..fb6d3e471 100755..100644 --- a/cli/tests/055_import_wasm_via_network.wasm +++ b/cli/tests/055_import_wasm_via_network.wasm |