[Mongrel] [SURVEY] MIME types questions for Mongrel 1.0 RC1

Nick Sieger nicksieger at gmail.com
Wed Dec 6 17:50:53 EST 2006

On 12/6/06, Zed A. Shaw <zedshaw at zedshaw.com> wrote:
> 1) Should Mongrel support a larger set of default mime types?

Yes.  The hardcore folks who have opinions will probably want to customize
theirs anyway, but the people who don't care (probably the majority of
users) will appreciate having some "suitable" defaults.  (Dodging the issue
of what's "suitable" here; see below.)

2) What should those defaults be?  Post a YAML file somewhere so I can
> compare the various answers.

require 'webrick/httputils'
require 'yaml'
puts YAML::dump(Hash[*WEBrick::HTTPUtils::DefaultMimeTypes.map {|k,v|
[".#{k}", v]}.zip.flatten])

3) What should be the default mime type if a file doesn't match?


3a) Where do you get this default?

RFC 1521, by virtue of it being mentioned as the primary subtype.

4) Would anyone object to Mongrel moving the default mime type list into a
> YAML file in the source tree that it loads?  **You'd still be able to
> override like normal.**

No objection.

5) If your favorite web server does it a particular way, do you actually
> think this is the real standard or just what that web server does?

Well, I wouldn't say WEBrick is my favorite, it was just close at hand, the
types seemed reasonable, and it's a smaller set of types than, say, Apache's
default mime.types file.  I think getting consensus from the community on
the default set of types is totally a bikeshed issue waiting to happen;
you'll have to end up drawing a line in the sand on the set of default
types, and a smaller set is probably better than a larger one.  Picking one
that's already in the Ruby distro is maybe a cop-out, but then it gives you
leverage to push back on differences and say that they'd have to be accepted
into the standard library (bwah ha ha).

5a) Do you think this default could be improved on depending on the
> situation?  Think development vs. production deployments.

I could see a larger set of defaults in a dev environment, or possibly
changing the default-if-not-found to "text/plain" or some other for
debugging purposes.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/7c14249e/attachment.html 

More information about the Mongrel-users mailing list