aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-06-05 15:18:10 +0000
committerOmar Polo <op@omarpolo.com>2024-06-05 15:18:10 +0000
commit6174e65dbe4c3cd189bb5ec4e011771c3f5afc82 (patch)
treed02fbb00897241c12a024467da84c2cbf0c533cb
parentc38417e32dbbda8910b29039c61be4c30621ba7f (diff)
add a nice error message in case the `cgi' option is present
was removed with gmid 2.0 but to ease the migration a friendly error message is more useful than a "syntax error".
-rw-r--r--parse.y8
1 files changed, 7 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index ef7ef67..797936a 100644
--- a/parse.y
+++ b/parse.y
@@ -123,7 +123,7 @@ typedef struct {
%token ACCESS ALIAS AUTO
%token BLOCK
-%token CA CERT CHROOT CLIENT
+%token CA CERT CGI CHROOT CLIENT
%token DEFAULT
%token FACILITY FASTCGI FOR_HOST
%token INCLUDE INDEX IPV6
@@ -384,6 +384,11 @@ servopt : ALIAS string {
free(host->cert_path);
host->cert_path = $2;
}
+ | CGI string {
+ free($2);
+ yyerror("`cgi' was removed in gmid 2.0."
+ " Please use fastcgi or proxy instead.");
+ }
| KEY string {
ensure_absolute_path($2);
free(host->key_path);
@@ -651,6 +656,7 @@ static const struct keyword {
{"block", BLOCK},
{"ca", CA},
{"cert", CERT},
+ {"cgi", CGI},
{"chroot", CHROOT},
{"client", CLIENT},
{"default", DEFAULT},