[Mongrel] favicon

carmen _ at whats-your.name
Fri Dec 1 13:12:02 EST 2006


im trying to figure out how to serve a favicon.ico for my app, does anyone have a line for Mongrel::Configurator? all i can see is that everyone seems to use the 404 handler...how boring..

uri "/favico", :handler => Mongrel::DirHandler.new(File.dirname(__FILE__)+"/favicon.ico")  is sort of close, but it says The image ?http://m/favicon.ico? cannot be displayed, because it contains errors. . puting the favicon into its own dir, means it ends up at /favico/favicon.ico which isnt right either. should i be hacking up the dirhandler to serve a static file if the pathname argument is a file not a dir? or is there some SingleFileHandler that im missing (would like to keep the modified header checks from DirHandler)


More information about the Mongrel-users mailing list