Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Mimetype for Wasm Files #82

Closed
tooolbox opened this issue Jun 27, 2021 · 3 comments
Closed

Incorrect Mimetype for Wasm Files #82

tooolbox opened this issue Jun 27, 2021 · 3 comments
Assignees
Labels
bug This is a bug

Comments

@tooolbox
Copy link
Collaborator

When serving a .wasm with static file serving, the content type is application/wasm; charset=utf-8 which breaks WebAssembly.instantiateStreaming. This was all I could find on it so far.

Not sure where this is coming from.

@tooolbox
Copy link
Collaborator Author

Got it, using mimereader with utf8 as true here which apparently adds ;charset=utf-8 per this. @xyproto would you mind popping a fix on this one?

More generally, I'm not familiar enough with web standards to know what's correct and what's not to add charset=utf-8. Is that appropriate for something like image/jpg?

@xyproto
Copy link
Owner

xyproto commented Jun 27, 2021

One of the design principles for Algernon is to use UTF-8 everywhere, whenever it is humanly possible. I guess ;charset=utf-8 does not make sense for image/jpg and would just be ignored if appended to the mimetype, though.

I'll look into the wasm mimetype. 👍

@xyproto xyproto self-assigned this Jul 14, 2021
@xyproto xyproto added the bug This is a bug label Jul 14, 2021
xyproto added a commit that referenced this issue Aug 17, 2021
@xyproto
Copy link
Owner

xyproto commented Aug 17, 2021

I believe this is now fixed in the main branch. Please test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants