ninenines / cowboy

Small, fast, modern HTTP server for Erlang/OTP.
https://ninenines.eu
ISC License
7.29k stars 1.17k forks source link

Native mimetypes to complement cowboy_static #505

Closed dvv closed 10 years ago

dvv commented 11 years ago

What do you people think of implementing the subject? I spawned https://github.com/dvv/mimetypes -- it uses Apache-driven mime type list. For needs of cowboy this list may or may not be way exhaustive.

So the questions are:

--Vladimir

bullno1 commented 11 years ago

1) I'm neutral on this. 2) Yes. IIRC, some browsers will not treat the files correctly if mimetype is incorrect. e.g: HTML5 offline resource manifest: http://www.fuckyeahtml5.com/2011/06/debugging-html5s-offline-web-apps/ 3) Copy from Apache?

fishcakez commented 11 years ago

I think this list from html5boilerplate is probably about right: https://github.com/h5bp/server-configs/blob/master/nginx/mime.types It covers all reasonable mimetypes while being maintainable/not excessive.

dvv commented 11 years ago

Right. Never saw such a monster extension https://github.com/h5bp/server-configs/blob/master/nginx/mime.types#L95 :D

essen commented 10 years ago

So mimetypes are in. Closing, thanks!