First off, apologies if this is addressed.. I didn't find anyone
having the same problem (which usually means the problem is me!)
I'm running the standard command to start a Rails server, with
additional custom mime YAML:
mongrel_rails start -m /etc/mongrel_mime.yml
Content of the /etc/mongrel_mime.yml is only a single line:
.xml: text/xml
However, the custom mime isn't picked up and my XML files were served
with default mime.
A bit of digging I found trunk/bin/mongrel_rails (line 87) containing
lines to parse the YAML file:
mime = {}
if defaults[:mime_map]
log "Loading additional MIME types from #{defaults[:mime_map]}"
mime = load_mime_map(defaults[:mime_map], mime)
end
The only thing is... the variable "mime" wasn't used anywhere. Further
down at line 99 is:
uri "/", :handler => rails
The custom mime will only be picked up if I change that line to:
uri "/", :handler => rails({:mime => mime})
What am i missing here? Why isn't the 'mime' local variable used?
Thanks for any enlightenment
--
choonkeat
http://www.rssfwd.com/
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users