[Catalyst] If-Modified-Since Plugin::Static Engine::Apache

Andrew Bramble andrew.bramble at omnilab.com.au
Fri May 26 17:47:09 CEST 2006


On Saturday 27 May 2006 01:35, Andy Grundman wrote:
> On 5/26/06, Andrew Bramble <andrew.bramble at omnilab.com.au> wrote:
> > Hello,
> >
> > Has anyone else experienced problems with  $c->serve_static_file and
> > Apache2/ mod_perl ?
> >
> > I have discovered that when running under modperl2 the initial request
> > succeeds but a subsequent request for the same file (with header
> > specifying 'Is-Modified-Since' ) generates 500 internal error from apache
> > in situations where Plugin::Static has set response status to 304.
> > Nothing enlightening appears in the debug output, This does not occur
> > when running with the catalyst http server.
>
> Hmm, the 304 code was removed in Static::Simple 0.11, so maybe you
> need to upgrade?  Also, under Apache, don't use Static::Simple, let
> Apache serve the files directly, it will be much faster.

Thanks Andy, will try that. My reason for Static::Simple is to serve files 
that 'belong' to a certain user , so the requested path is joined to the 
users home directory and the result pushed to serve_static_file. Foir truely 
static things 'root/static' I am using apache direct for exactly the reason 
you describe.
I believe this might be possible with an apache transhandler, but then there 
goes the lovely Catalyst::Engine portability.





More information about the Catalyst mailing list