Forum: Mongrel Static files and mongrel

77dae8923911b83d3d4e1fbb22d95cd8?d=identicon&s=25 Emmanuel Pinault (Guest)
on 2008-06-05 22:47
(Received via mailing list)
Hi

how does mongrel (without rails or merb) handles Static files? Do I
have to create a handler for static file handling?

Thanks

Emmanuel
Ca8efd0ba834b02b9b7dd34b5c6c2721?d=identicon&s=25 Kirk Haines (Guest)
on 2008-06-05 23:13
(Received via mailing list)
On Thu, Jun 5, 2008 at 2:45 PM, Emmanuel Pinault <seatmanu@gmail.com>
wrote:
> Hi
>
> how does mongrel (without rails or merb) handles Static files? Do I have to
> create a handler for static file handling?

Use the DirHandler.  It's one of the standard handlers bundled with
Mongrel.  If you look at the Mongrel code, it is in the
mongrel/handlers.rb file.

The general advice, to let whatever is upstream of Mongrel handle
static files, is good advice, though.


Kirk Haines
77dae8923911b83d3d4e1fbb22d95cd8?d=identicon&s=25 Emmanuel Pinault (Guest)
on 2008-06-05 23:53
(Received via mailing list)
Oh, I though it was just for Directory listing. Does it handle
automatically the MIME type? I see in the doc that there are
references to a mimes.yml

thanks for the advice. This is not meant for production system but
more simulator so should be fine. Otherwise I use Apache or any other
web server usually to pick up the static files then have mongrel just
handle dynamic part

Thanks

Emmanuel
This topic is locked and can not be replied to.