Static::Simple 0.06 (Re: [Catalyst] Sessions, Auth::CDBI, and
static files)
Andy Grundman
andy at hybridized.org
Tue Sep 6 18:21:50 CEST 2005
I don't really know the best way to implement this either. So far it's
just a start. I only tested it with the Session plugins, which do their
work in prepare_action to check the session cookie. So you can now
easily remove the overhead of checking the session cookie on every
static file request.
I don't think any of the current Auth plugins are able to secure static
files unless you handle them manually with the other Static plugin. But
maybe future plugins or app-specific plugins will be able to make use of
this.
As of 0.07, the only method that will be ignored in downstream plugins
following Static::Simple is prepare_action(). Work done in other
methods will not be ignored. I am interested to see what can be done
with this, and if more is needed to short-circuit the other methods, i.e.:
sub prepare_body {
my $c = shift;
return if $c->_static_file;
return $c->NEXT::prepare_body(@_);
}
-Andy
More information about the Catalyst
mailing list