Commit Diff
Diff:
cd5826b8ba3b43ed9802309688ae029c0f5c4081
2025e96d976677a7bf6bbe54185eb7bca026fe9d
Commit:
2025e96d976677a7bf6bbe54185eb7bca026fe9d
Tree:
a8c11171764281d2d252887712e8651fa87d364c
Author:
Omar Polo <op@omarpolo.com>
Date:
Sat Sep 10 09:48:30 2022 UTC
Message:
drop cgi vestiges from the struct host

The `env' list is no longer used since CGI scripts were removed
commit - cd5826b8ba3b43ed9802309688ae029c0f5c4081
commit + 2025e96d976677a7bf6bbe54185eb7bca026fe9d
blob - c1fc46e96eca9891cfa22d572767138f6fb39bbe
blob + 18952a1e6ec45150d3f94b35821c57ee5aa0f895
--- gmid.c
+++ gmid.c
@@ -240,14 +240,6 @@ free_config(void)
close(l->dirfd);
free(l);
- }
-
- TAILQ_FOREACH_SAFE(e, &h->env, envs, te) {
- TAILQ_REMOVE(&h->env, e, envs);
-
- free(e->name);
- free(e->value);
- free(e);
}
TAILQ_FOREACH_SAFE(e, &h->params, envs, te) {
blob - 68026c0fe0e03c50a8ae4784be3874df9db9a2fa
blob + 4f1901d0095a292d728c88363ed83cd5610e1bb3
--- gmid.h
+++ gmid.h
@@ -171,7 +171,6 @@ struct vhost {
*/
struct lochead locations;
- struct envhead env;
struct envhead params;
struct aliashead aliases;
struct proxyhead proxies;
blob - c48c046301402665bfc1c1d7e14475d43a460393
blob + 655192b07233e928be3a7d0ceb23caa01a2a40de
--- parse.y
+++ parse.y
@@ -94,7 +94,7 @@ void add_param(char *, char *, int);
void only_once(const void*, const char*);
void only_oncei(int, const char*);
int fastcgi_conf(char *, char *, char *);
-void add_param(char *, char *, int);
+void add_param(char *, char *);
static struct vhost *host;
static struct location *loc;
@@ -285,7 +285,7 @@ servopt : ALIAS string {
host->ocsp = ensure_absolute_path($2);
}
| PARAM string '=' string {
- add_param($2, $4, 0);
+ add_param($2, $4);
}
| locopt
;
@@ -1197,16 +1197,11 @@ add_param(char *name, char *val, int env)
}
void
-add_param(char *name, char *val, int env)
+add_param(char *name, char *val)
{
struct envlist *e;
- struct envhead *h;
+ struct envhead *h = &host->params;
- if (env)
- h = &host->env;
- else
- h = &host->params;
-
e = xcalloc(1, sizeof(*e));
e->name = name;
e->value = val;
Omar Polo