Skip to content

Commit

Permalink
add a nice error message in case the `cgi' option is present
Browse files Browse the repository at this point in the history
was removed with gmid 2.0 but to ease the migration a friendly error
message is more useful than a "syntax error".
  • Loading branch information
omar-polo committed Jun 5, 2024
1 parent c38417e commit 6174e65
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -651,6 +656,7 @@ static const struct keyword {
{"block", BLOCK},
{"ca", CA},
{"cert", CERT},
{"cgi", CGI},
{"chroot", CHROOT},
{"client", CLIENT},
{"default", DEFAULT},
Expand Down

0 comments on commit 6174e65

Please sign in to comment.