define and use GMID_VERSION

This commit is contained in:
Omar Polo 2021-05-15 11:11:56 +00:00
parent d1051bfaa0
commit ce2c9edbc2
3 changed files with 4 additions and 2 deletions

2
ex.c
View File

@ -187,7 +187,7 @@ launch_cgi(struct iri *iri, struct cgireq *req, struct vhost *vhost,
safe_setenv("SERVER_PORT", path);
safe_setenv("SERVER_PROTOCOL", "GEMINI");
safe_setenv("SERVER_SOFTWARE", "gmid/1.6");
safe_setenv("SERVER_SOFTWARE", GMID_VERSION);
if (*req->subject != '\0')
safe_setenv("AUTH_TYPE", "Certificate");

2
fcgi.c
View File

@ -477,7 +477,7 @@ send_fcgi_req(struct fcgi *f, struct client *c)
fcgi_send_param(f->fd, c->id, "REQUEST_METHOD", "");
fcgi_send_param(f->fd, c->id, "SERVER_NAME", c->iri.host);
fcgi_send_param(f->fd, c->id, "SERVER_PROTOCOL", "GEMINI");
fcgi_send_param(f->fd, c->id, "SERVER_SOFTWARE", "gmid/1.7");
fcgi_send_param(f->fd, c->id, "SERVER_SOFTWARE", GMID_VERSION);
if (fcgi_end_param(f->fd, c->id) == -1)
close_all(f);

2
gmid.h
View File

@ -38,6 +38,8 @@
#include <openssl/x509.h>
#define GMID_VERSION "gmid/1.7"
#define GEMINI_URL_LEN (1024+3) /* URL max len + \r\n + \0 */
#define SUCCESS 20