Commit Diff


commit - ff954a3e7641e83cca043ecc30789132478c7acd
commit + 762b9b991f373e5077d7e49396af62a34fa1c1ff
blob - 11c017ea01d9e617708fea4f92e0cf5acc7feeb2
blob + baa756501b61b67c3c1188aa17bce09fcb31163e
--- gmid.1
+++ gmid.1
@@ -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 Ar value
+.It Ic env Ar name Cm => Ar value
 Set the environment variable
 .Ar name
 to
@@ -306,7 +306,7 @@ when executing CGI scripts.
 Can be provided more than once.
 .\" don't document the "spawn <prog>" form because it probably won't
 .\" be kept.
-.It Ic fastcgi Oo Ic tcp Oc Pa socket Oo Ar port Oc
+.It Ic fastcgi Oo Ic tcp Oc Pa socket Oo Cm port Ar port Oc
 Enable FastCGI instead of serving files.
 The
 .Pa socket
@@ -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 Ar value
+.It Ic param Ar name Cm => Ar value
 Set the param
 .Ar name
 to
blob - 4ecee6323805408d152defbdfed74af8e2cdb12f
blob + 65637912ffad1050ef333fb046b6b338b9c1b1a7
--- parse.y
+++ parse.y
@@ -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
+%token	TFASTCGI TSPAWN TPARAM TMAP TTOEXT TARROW
 
 %token	TERR
 
@@ -210,15 +210,15 @@ servopt		: TALIAS string {
 				memmove($2, $2+1, strlen($2));
 			host->entrypoint = $2;
 		}
-		| TENV string string {
-			add_param($2, $3, 1);
+		| TENV string TARROW string {
+			add_param($2, $4, 1);
 		}
 		| TKEY string		{
 			only_once(host->key, "key");
 			host->key  = ensure_absolute_path($2);
 		}
-		| TPARAM string string {
-			add_param($2, $3, 0);
+		| TPARAM string TARROW string {
+			add_param($2, $4, 0);
 		}
 		| locopt
 		;
@@ -294,9 +294,9 @@ fastcgi		: TSPAWN string {
 			only_oncei(loc->fcgi, "fastcgi");
 			loc->fcgi = fastcgi_conf($1, NULL, NULL);
 		}
-		| TTCP string TNUM {
+		| TTCP string TPORT TNUM {
 			char *c;
-			if (asprintf(&c, "%d", $3) == -1)
+			if (asprintf(&c, "%d", $4) == -1)
 				err(1, "asprintf");
 			only_oncei(loc->fcgi, "fastcgi");
 			loc->fcgi = fastcgi_conf($2, c, NULL);
@@ -305,9 +305,9 @@ fastcgi		: TSPAWN string {
 			only_oncei(loc->fcgi, "fastcgi");
 			loc->fcgi = fastcgi_conf($2, xstrdup("9000"), NULL);
 		}
-		| TTCP string string {
+		| TTCP string TPORT string {
 			only_oncei(loc->fcgi, "fastcgi");
-			loc->fcgi = fastcgi_conf($2, $3, NULL);
+			loc->fcgi = fastcgi_conf($2, $4, NULL);
 		}
 		;
 
@@ -429,7 +429,10 @@ repeat:
 		yylval.lineno++;
 		goto repeat;
 	case '=':
-		return c;
+		if ((c = getc(yyfp)) == '>')
+			return TARROW;
+		ungetc(c, yyfp);
+		return '=';
 	case EOF:
 		goto eof;
 	}