(@aws-cdk/aws-s3-deployment): wrong MIME type for WebAssembly files
See original GitHub issueWhen 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:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top 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 >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
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:
⚠️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.