change (again) the env/param separator: use '='

Given that env/param are new features of this release, no support for
the "old" syntax is needed.
This commit is contained in:
Omar Polo 2021-07-09 07:27:15 +00:00
parent 762b9b991f
commit efacb859a7
2 changed files with 6 additions and 9 deletions

4
gmid.1
View File

@ -297,7 +297,7 @@ is set to
Handle all the requests for the current virtual host using the
CGI script at
.Pa path .
.It Ic env Ar name Cm => Ar value
.It Ic env Ar name Cm = Ar value
Set the environment variable
.Ar name
to
@ -359,7 +359,7 @@ except
.Ic entrypoint No and Ic cgi .
.It Ic log Ar bool
Enable or disable the logging for the current server or location block.
.It Ic param Ar name Cm => Ar value
.It Ic param Ar name Cm = Ar value
Set the param
.Ar name
to

11
parse.y
View File

@ -88,7 +88,7 @@ char *symget(const char *);
%token TIPV6 TPORT TPROTOCOLS TMIME TDEFAULT TTYPE TCHROOT TUSER TSERVER
%token TPREFORK TLOCATION TCERT TKEY TROOT TCGI TENV TLANG TLOG TINDEX TAUTO
%token TSTRIP TBLOCK TRETURN TENTRYPOINT TREQUIRE TCLIENT TCA TALIAS TTCP
%token TFASTCGI TSPAWN TPARAM TMAP TTOEXT TARROW
%token TFASTCGI TSPAWN TPARAM TMAP TTOEXT
%token TERR
@ -210,14 +210,14 @@ servopt : TALIAS string {
memmove($2, $2+1, strlen($2));
host->entrypoint = $2;
}
| TENV string TARROW string {
| TENV string '=' string {
add_param($2, $4, 1);
}
| TKEY string {
only_once(host->key, "key");
host->key = ensure_absolute_path($2);
}
| TPARAM string TARROW string {
| TPARAM string '=' string {
add_param($2, $4, 0);
}
| locopt
@ -429,10 +429,7 @@ repeat:
yylval.lineno++;
goto repeat;
case '=':
if ((c = getc(yyfp)) == '>')
return TARROW;
ungetc(c, yyfp);
return '=';
return c;
case EOF:
goto eof;
}