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

Does default mimetype should not be "text/plain"? #108

Open
Godzil opened this issue Sep 4, 2017 · 2 comments
Open

Does default mimetype should not be "text/plain"? #108

Godzil opened this issue Sep 4, 2017 · 2 comments

Comments

@Godzil
Copy link
Contributor

Godzil commented Sep 4, 2017

Wouldn't be better to use a mime type like "application/octet-stream" than "text/plain" for unknown types?

if mt[ext] then return mt[ext] else return "text/plain" end

I know that we are not going to serve really complicated thing with this server, but if the file is not text we will probably get corrupted data as the browser will expect 7bit ASCII

@marcoskirsch
Copy link
Owner

I don't have a strong opinion on this. I honestly don't know what's best. Ideally nobody relies on the default.

If you serve a H or CPP or PY file from the server, you'd want text. What would you serve where you'd want octet-stream?

@marcoskirsch
Copy link
Owner

Ok. I learned to use Google.
I think your suggestion makes sense. Feel free to do a PR.

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

No branches or pull requests

2 participants