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.

(@aws-cdk/aws-s3-deployment): wrong MIME type for WebAssembly files

See original GitHub issue

When using the BucketDeployment we have small options to include and exclude. Somehow we are not getting it right. The origin lays in the fact that aws s3 is serving .wasm files as wrong MIME type namely content-type: binary/octet-stream while it should be content-type: application/wasm.

Im wondering why feature requests like: https://github.com/aws/aws-cdk/issues/7090 https://github.com/aws/aws-cdk/issues/4687

Don’t have any traction, since our old s3 cp task could do this simply in a heartbeat.

Is it possible to fix this mime type, or for consumers to alter headers per file type OR patterns in a simple way without first including part x then excluding part y then including part y excluding part z. It’s not readable and not maintainable.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
otaviomacedocommented, Jun 3, 2021

The root cause is that Python’s mimetypes library (that the AWS CLI relies on to guess the MIME type) doesn’t have a mapping for WebAssembly. You can try to send a pull request to them with a new entry:

'.wasm'    : 'application/wasm',
0reactions
github-actions[bot]commented, Jun 3, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

incorrect mime type for WebAssembly files! #5743 - GitHub
The aws cli sets an incorrect mime type for web assembly files (.wasm) . Currently it is set to " binary/octet-stream " It...
Read more >
WebAssembly InstantiateStreaming Wrong MIME type
According to MDN the importObject is to unwrap the nested argument. Weird, but OK. To make this as simple as possible I put...
Read more >
Incorrect response MIME type. Expected 'application/wasm'.
I figured I would be able to just load all the client-side files from a folder just like with referencing local js files...
Read more >
wasmagic - npm
WASMagic detects any file type detected by libmagic, which is over 1500 mime types. For comparison; the file-type library supports 138 types.
Read more >
Hosting a WebAssembly App - Uno Platform
Regardless of the web server (or reverse proxy) software used, the support the following Content (MIME) types are always needed: application/wasm; application/ ...
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