On 06/08/2010, at 05:21, C. Mundi wrote:

> So... The nonfinal forbid trumps the default allow in the case of
> a.php...is that because of the order?  Or because default is weaker
> than patterns?

The rule list is evaluated from top to bottom. If a rule matches the request 
there are two possible outcomes, depending on whether or not it's a final rule:

- Final Rule: The content of the rule is applied, and the evaluation finishes.
- Non-Final Rule: The content of the rule is applies, and the evaluation 
continues until a final rule is matched or the final (default) rule is reached.

The 'Leave unset' option of the encoders means that, whenever a rule is 
applied, it will not change the status of the encoding status.

Another example using the previous rule list: /abc.php.  It matches the first 
rule, so GZip is forbidden; since it is no-final the evaluation continues. It 
also matches the second rule, but since Gzip support got already forbidden 
nothing is changed. When it hits the last rule, the same thing happens: GZip is 
already forbidden, so the value is not overwritten.


> On 8/5/10, Alvaro Lopez Ortega <[email protected]> wrote:
>> On 05/08/2010, at 23:57, Stefan de Konink wrote:
>>> On Thu, 5 Aug 2010, Richard Owen wrote:
>>> 
>>>> What is the difference between 'Leave Unset' and 'Allow' in the GZip and
>>>> Deflate options?
>>> 
>>> I thought this has to do with the fact that you can use a non-final rule,
>>> that does not change (or does) that setting.
>> 
>> Exactly.
>> 
>> Imagine the following scenario:
>> 
>> - Rule: *.php, Non-Final, Gzip forbidden
>> - Rule: a*,    Non-Final, Gzip leave unset
>> - Default:     Final,     GZip allowed
>> 
>> These test requests would be evaluated as:
>> 
>> /foo.php - wouldn't use GZip
>> /aaa.txt - would use Gzip (a* wouldn't set it, but since it's non-final the
>> default rule would)
>> /zzz.txt - would use it (set by the default rule)
>> 
>> --
>> Octality
>> http://www.octality.com/
>> 
>> _______________________________________________
>> Cherokee mailing list
>> [email protected]
>> http://lists.octality.com/listinfo/cherokee
>> 

--
Octality
http://www.octality.com/

_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to