-
Notifications
You must be signed in to change notification settings - Fork 659
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
Elm reactor doesn't serve large files correctly #1972
Comments
I have a similar problem with a csv file. My csv file content is wrapped with:
I suspect adding |
Nice! I suspect that the ideal approach here would either:
|
Thanks for the suggestions. Using OS mimetype information on windows and proper mime guessing will require some work, this python example could be a good guide. I'm going to start out by simply adding to the dict. |
Awesome! If you're making the PR, could you add |
Sure :) . Just to double check; in your first comment you said it needed to be |
Honestly, any Also: if they're open to adding a new dependency, https://hackage.haskell.org/package/mime-types seems like it would work just fine as a platform-independent, extension-based approach. |
Interesting, excellent find! |
…eously wrapped in HTML when using reactor elm#1972
Quick Summary:
elm reactor
doesn't properly serve a wasm file (magic numbers corrupted; downloaded binary files differ in size).Seems to be the same as elm-lang/elm-reactor#214.
SSCCE
Put z3w.wasm from https://github.com/cpitclaudel/z3.wasm/releases/tag/v0.1 in a directory and serve it from
elm reactor
. Download z3w.wasm---the file sizes differ. Doing the same procedure withpython -m http.server
yields a file of correct size.Probable fix
The reactor seems to be sending the wasm file as text/html rather than application/octet-stream:
I suspect that text munging (e.g., null bytes, newlines, carriage returns, etc.) is the source of the problem. Doing better Content-Type inference would help (see also elm-lang/elm-reactor#217).
The text was updated successfully, but these errors were encountered: