I wanted to use httpd's fastcgi "socket" and "strip" options and based upon
the man page's brief text:
[no] fastcgi [option]
Enable FastCGI instead of serving files. Valid options are:
tried "obvious" permutations such as:
fastcgi strip 1 socket "..."
fastcgi socket "..." strip 1
fastcgi socket "...", strip 1
but with each was greeted by a terse "syntax error".
After hunting around in the relevant parse.y file, it transpires that the
grammar allows, roughly speaking, the following:
fastcgi
fastcgi option
fastcgi { option ((',' '\n'? | '\n') option)* }
In other words, if you want to use more than one option you *have* to use
the {...} notation, but there's more than one way for options inside curly
brackets to be separated. In my case I can specify:
fastcgi {
socket "..."
strip 1
}
or:
fastcgi {
socket "...", strip 1
}
or:
fastcgi {
socket "...",
strip 1
}
This raised a couple of questions in my mind.
First, stylistically, I'm not quite sure if having three slightly different
ways of separating multiple options is useful or not. That said, I assume
that some people might already be taking advantage of this flexibility, so
perhaps worrying about it now is pointless.
Second, is it worthwhile giving users a hint about what to do when multiple
options need to be specified? For example, something like:
[no] fastcgi [option]
Enable FastCGI instead of serving files. If more than option
is specified, they must be included inside { ... }, with each
option separated by a comma or newline. Valid options are:
I'm happy to raise a patch if other people think this is worth fixing,
although I'm not entirely sure if we want to make people aware of the full
extent of the grammar, or something a little less complete such as the
suggestion above.
Laurie