Kurt McKee wrote:
John Hampton wrote:
Setting precedence via order of appearance in config file seems pretty
good, except it could get very confusing when using includes.
Thinking about it some more, if order of appearance is used (and I'm not
against it) I definitely think that the higher precedence should be set
for things that appear later in the file.
I never would have considered an include causing a problem - good
thinking! My personal thoughts would be that it isn't intuitive to make
the precedence order first->lowest, last->highest. It seems more logical
for items at the beginning of a config file to have higher precedence.
I guess it's a top-down vs bottom up approach. I tend to think global
stuff first, and then more specific stuff after that. Rather than put
specific first and global last. I guess it's really a matter of preference.
As for ensuring that instructions in cherokee.conf can be overwritten,
there are two options I can think of (if highest-to-lowest precedence is
followed): (1) either included files are interpreted to always override
the settings in cherokee.conf, or (2) the files can be included at the
top of cherokee.conf.
For (1), it seems to me that that would be a slightly nastier code path
in the code. It's another exception that you have to make. However,
I'm not familiar with the code, so that might not actually be an issue.
Of course, thinking some more, it seems that if highest-to-lowest
precedence is chosen, then that's basically a first-match type of rule
set. First-match may actually be easier to implement than a last-match
type of scenario. Well, I'll let Alvaro decide. I'll back the one that
makes the code the cleanest.
-John
_______________________________________________
Cherokee mailing list
[email protected]
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee