From: Jos Boumans Date: Wed, 13 May 2009 08:46:09 +0000 (+0000) Subject: * make it clear your application must generate a 404 or a file if static::simple... X-Git-Tag: v0.22~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Static-Simple.git;a=commitdiff_plain;h=200e206c5e39d14bc442d2da8776f3c67ed7ca48 * make it clear your application must generate a 404 or a file if static::simple can't find the file requested --- diff --git a/lib/Catalyst/Plugin/Static/Simple.pm b/lib/Catalyst/Plugin/Static/Simple.pm index caf3a0e..02801de 100644 --- a/lib/Catalyst/Plugin/Static/Simple.pm +++ b/lib/Catalyst/Plugin/Static/Simple.pm @@ -300,6 +300,18 @@ through Catalyst. Note that actions mapped to paths using periods (.) will still operate properly. +If the plugin can not find the file, the request is dispatched to your +application instead. This means you are responsible for generating a +C<404> error if your applicaton can not process the request: + + # handled by static::simple, not dispatched to your application + /images/exists.png + + # static::simple will not find the file and let your application + # handle the request. You are responsible for generating a file + # or returning a 404 error + /images/does_not_exist.png + Though Static::Simple is designed to work out-of-the-box, you can tweak the operation by adding various configuration options. In a production environment, you will probably want to use your webserver to deliver