aboutsummaryrefslogtreecommitdiff
path: root/fcgi.c
diff options
context:
space:
mode:
authornytpu <alex@nytpu.com>2022-10-29 21:56:50 -0600
committerOmar Polo <op@omarpolo.com>2022-10-30 08:21:39 +0100
commit50a8f9107c1e3cf94a2c9e548d55cd5349e5434f (patch)
treeb107c00ebb2bd42b9e1ed0d06d3b56c4118b05fd /fcgi.c
parent7b00c8900b91302abe0695f495aa3baff90e9896 (diff)
always send custom list of fcgi parameters
The code in fcgi_req to send the custom params set in the config file was placed inside the conditional for `tls_peer_cert_provided`, so the custom parameters would not be sent if a client certificate is not provided.
Diffstat (limited to 'fcgi.c')
-rw-r--r--fcgi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fcgi.c b/fcgi.c
index 6e67ea7..33df816 100644
--- a/fcgi.c
+++ b/fcgi.c
@@ -368,6 +368,10 @@ fcgi_req(struct client *c)
fcgi_send_param(c->cgibev, "SERVER_PROTOCOL", "GEMINI");
fcgi_send_param(c->cgibev, "SERVER_SOFTWARE", GMID_VERSION);
+ TAILQ_FOREACH(p, &c->host->params, envs) {
+ fcgi_send_param(c->cgibev, p->name, p->value);
+ }
+
if (tls_peer_cert_provided(c->ctx)) {
fcgi_send_param(c->cgibev, "AUTH_TYPE", "CERTIFICATE");
fcgi_send_param(c->cgibev, "REMOTE_USER",
@@ -395,9 +399,6 @@ fcgi_req(struct client *c)
gmtime_r(&tim, &tminfo));
fcgi_send_param(c->cgibev, "TLS_CLIENT_NOT_AFTER", buf);
- TAILQ_FOREACH(p, &c->host->params, envs) {
- fcgi_send_param(c->cgibev, p->name, p->value);
- }
} else
fcgi_send_param(c->cgibev, "AUTH_TYPE", "");