Mailing List Archive

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
Re: Cherokee/Output Compression [ In reply to ]
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
_______________________________________________
Cherokee mailing list
Cherokee@lists.octality.com
http://lists.octality.com/listinfo/cherokee
Re: Cherokee/Output Compression [ In reply to ]
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@konink.de]
Sent: Sunday, February 12, 2012 7:04 PM
To: Jaime Bozza
Cc: cherokee@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
_______________________________________________
Cherokee mailing list
Cherokee@lists.octality.com
http://lists.octality.com/listinfo/cherokee