sukria/Dancer — pull request #848 by book (2012-10-16 08:17:16+00:00)
Title: Add support for If-Modified-Since when handling static file requests

This actually adds two features:
- when sending a static file, it adds a Last-Modified header
- when a static file is requested, and an If-Modified-Since header is sent, and the file is not newer, a 304 response is sent

While coding this, I didn't take into account the fact that hooks may deal with those headers.

For example, a before_file_render hook could deal with the If-Modified-Since header, while an after_file_render could deal with Last-Modified (especially if any hook did modify the content, then the date fetched from the filesystem would be incorrect).

So maybe this changeset is an incorrect solution to the problem.