Jaime Bozza | 13 Feb 02:44 2012

Cherokee/Output Compression

Hello all,

 

I have a question that I can’t really seem to figure out. I’d like to use output compress with Cherokee and PHP pages, but I only want to turn it on for certain mime-types. For instance, I’d like to not gzip any images that I create using PHP.

 

Is there a way to turn on Deflate/gzip based on mime type, or some other set of options that I can selectively use compression through Cherokee in a situation like this?

 

Jaime

 

_______________________________________________
Cherokee mailing list
Cherokee <at> lists.octality.com
http://lists.octality.com/listinfo/cherokee
Stefan de Konink | 13 Feb 03:03 2012
Picon

Re: Cherokee/Output Compression

On Sun, 12 Feb 2012, Jaime Bozza wrote:

> Is there a way to turn on Deflate/gzip based on mime type, or some other set
> of options that I can selectively use compression through Cherokee in a
> situation like this?

By default compression is not enabled. So you could set extensions with 
non-final rules that explicitly enable it.

In the bugtracker I have asked for a feature that would allow compression 
to be marked by mime-type, a flag, that specifies, if in the general 
case, the file should be deflated. I guess this is what you are asking for 
too.

Stefan
Jaime Bozza | 13 Feb 03:07 2012

Re: Cherokee/Output Compression

Right - Setting extensions...   Unfortunately, that doesn't work if my PHP file is named "captcha.php" (for
instance), yet outputs a mime type of image/jpeg.  I wouldn't want to pass all ".jpg" files through PHP and
creating specific entries for each PHP script that outputs a different mime type would be quite annoying.

Looks like I'll just stick with PHP's output compression for now!

Thanks!

Jaime

-----Original Message-----
From: Stefan de Konink [mailto:stefan <at> konink.de] 
Sent: Sunday, February 12, 2012 7:04 PM
To: Jaime Bozza
Cc: cherokee <at> lists.octality.com
Subject: Re: [Cherokee] Cherokee/Output Compression

On Sun, 12 Feb 2012, Jaime Bozza wrote:

> Is there a way to turn on Deflate/gzip based on mime type, or some other set
> of options that I can selectively use compression through Cherokee in a
> situation like this?

By default compression is not enabled. So you could set extensions with 
non-final rules that explicitly enable it.

In the bugtracker I have asked for a feature that would allow compression 
to be marked by mime-type, a flag, that specifies, if in the general 
case, the file should be deflated. I guess this is what you are asking for 
too.

Stefan

Gmane