question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong behavior of `application/wasm` mime type

See original GitHub issue

Current 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:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
jfhbrookcommented, Apr 20, 2018

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.

1reaction
dcodeIOcommented, Apr 20, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found