Add content type for wasm, fix encoding in wasm test fixture (#4269)

This commit is contained in:
Aurélien Bertron 2020-03-06 17:31:22 +01:00 committed by GitHub
parent acf0958e94
commit 5e31b96f9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 1 deletions

View file

@ -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),
_ => {

View file

@ -1 +1 @@
{ __data_end, __dso_handle, __global_base, __heap_base, __wasm_call_ctors, add, memory }
{ add_one: [Function: 0], memory: Memory {} }

BIN
cli/tests/055_import_wasm_via_network.wasm Executable file → Normal file

Binary file not shown.