30 Sep
2013
30 Sep
'13
3:42 p.m.
Jakob Hirsch wrote:
It's a little odd that an empty if-section still returns a reject, i.e.
if (1) { # nothing in here }
Yes... it's a limitation of the underlying assumptions.
That's just like in previos versions, so it's no change of behaviour. The only use-case for that I can think of is some kind of autogenerating config system where someone uses $INCLUDE in an if-block. If the included file happens to be empty, the result might be a little surprising, and "surprising" is nothing you want in your system :)
In v3, blocks which are never evaluated are silently deleted: ... if (0) { blah1 blah2 blah3 } ... The entire "if" section will disappear from the running server, as if it never existed. Alan DeKok.