rack/rack — Issue #316: Why does Rack::Mime explicitly define ext's as application/octet-stream?
Author: nbibler
Created: 2012-01-18 02:10:17+00:00
State: open

See [.woff](https://github.com/rack/rack/blob/master/lib/rack/mime.rb#L601), [.ttf](https://github.com/rack/rack/blob/master/lib/rack/mime.rb#L558), [.so](https://github.com/rack/rack/blob/master/lib/rack/mime.rb#L516), and several more.

It seems very unusual that in the definition directly above the constant, there is [an "official" fetch method](https://github.com/rack/rack/blob/master/lib/rack/mime.rb#L16-19) that defaults missing extensions to being `application/octet-stream`, automatically. So, is the redefinition within the hash simply to cover the case for people accessing the constant directly from other external libraries? If so, it seems like that activity should be discouraged / deprecated.