diff options
author | nytpu <alex@nytpu.com> | 2022-10-31 18:23:13 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2022-10-31 18:23:13 +0000 |
commit | 339a27c63e865fc39e9fdd2816321ecd5f9e20be (patch) | |
tree | ae3204b4ba0b750a1bc0021405d87d7833bc4bd9 | |
parent | 5df699d1ab09618573bc4d076dfb3c4b3a78b4b4 (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.
-rw-r--r-- | fcgi.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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", ""); |