[Catalyst] patch: C::P::Compress::Deflate
peter at peknet.com
Tue Sep 19 17:45:15 CEST 2006
Perrin Harkins scribbled on 9/19/06 10:34 AM:
> Peter Karman wrote:
>> Patch below allows Compress::Deflate plugin to play nicely with
>> Static::Simple and to allow for skipping deflation based on browser.
>> Specifically, we found issues with older versions of IE that claimed
>> to deal with the deflate encoding but balked.
> Does this mean you are using Catalyst to serve static pages in
> production? That's going to hurt your performance quite a bit. Static
> pages are better left to your web server. For that matter, compressing
> pages is also better left to your web server.
No, we don't use Catalyst to serve static pages in production. That's actually
why I added the Static::Simple check. I like to be able to move code directly
dev -> testing -> production with only changing config files. My problem was
that Static::Simple messes with Deflate in devel (which is the only place I use
S::S) for CSS and other files, since they have text/* mime types.
I actually have a conditional in my base MyApp.pm file that checks if running
under mod_perl and only loads S::S if not under mod_perl. I was doing the same
thing with the Compress module (only loading if running under mod_perl) but I
wanted to test deflation in dev under the dev server, and still use S::S.
I didn't see mention of any fix in the list archives, hence this patch.
Peter Karman . http://peknet.com/ . peter at peknet.com
More information about the Catalyst