Wrong behavior of `application/wasm` mime type
See original GitHub issueCurrent webassebmly spec says
Note: extra parameters are not allowed, including the empty
application/wasm;
. https://webassembly.github.io/spec/web-api/index.html#streaming-modules
For now ecstatic adds charset in Content-Type
for all filetypes, so mimetype for wasm files will be application/wasm; charset=utf-8
. Can we somehow disable this for files with application/wasm
mimetype (or for binary files at all?)?
I’ll be happy to create PR if you tell me right way to figure out exclusions.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Incorrect response MIME type - Jitsi Community Forum
The error is this one: wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type.
Read more >Electron WebAssembly: TypeError: Incorrect response MIME ...
I'm trying to remove having the dependency of a web backend of my electron project. <script> WebAssembly.instantiateStreaming(fetch("relative/ ...
Read more >Properly configuring server MIME types - MDN Web Docs
If a web server or application reports an incorrect MIME type for content (including a "default ... This may cause unexpected behavior.
Read more >IIS v6.2 for Windows Server 2012 & WebAssembly modules
wasm files by default, but it can be achieved by add application/wasm to MIME types. Did the url of .wasm file is right?...
Read more >HTTP Response Header "Content-Type" configured incorrectly...
HTTP Response Header "Content-Type" configured incorrectly on the server for file Build/2.wasm, should be "application/wasm".
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/jfhbrook/node-ecstatic/blob/master/lib/ecstatic.js#L242-L247 potentially a bug in mime@1 ? upgrading mime is part of a bigger project.
Yeah, I think that’s the cause. Seems that the mime package removed the charset functionality entirely in v2. Ideally, if there’d be a way to detect that a mime type is indicating a binary file, appending the charset could simply be skipped, or something like that.