On Sun, Mar 21, 2021 at 05:08:00PM GMT, Laurence Tratt wrote:
> 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
> 

Hi Laurie,

I'd simply use the existing wording, without getting into details.

While there, "braces" dominate the manual page, with a single
occurrence of "brackets" so let's change that too, for consistency.

Regards,

Raf

Index: usr.sbin/httpd/httpd.conf.5
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/httpd.conf.5,v
retrieving revision 1.114
diff -u -p -r1.114 httpd.conf.5
--- usr.sbin/httpd/httpd.conf.5 29 Oct 2020 12:30:52 -0000      1.114
+++ usr.sbin/httpd/httpd.conf.5 21 Mar 2021 22:56:53 -0000
@@ -155,7 +155,7 @@ see
 .Xr patterns 7 .
 .El
 .Pp
-Followed by a block of options that is enclosed in curly brackets:
+Followed by a block of options that is enclosed in curly braces:
 .Bl -tag -width Ds
 .It Ic alias Ar name
 Specify an additional alias
@@ -282,6 +282,7 @@ will neither display nor generate a dire
 .El
 .It Oo Ic no Oc Ic fastcgi Oo Ar option Oc
 Enable FastCGI instead of serving files.
+Multiple options may be specified within curly braces.
 Valid options are:
 .Bl -tag -width Ds
 .It Ic socket Oo Cm tcp Oc Ar socket Oo Ar port Oc

Reply via email to