Actions
Feature #357
closedPatch: Set CGI var SERVER_SOFTWARE to server.tag
ASK QUESTIONS IN Forums:
Description
--- mod_cgi.c.orig Sun Sep 25 23:25:20 2005 +++ mod_cgi.c Mon Nov 7 11:05:37 2005 @@ -762,7 +762,12 @@ env.size = 0; env.used = 0; - cgi_env_add(&env, CONST_STR_LEN("SERVER_SOFTWARE"), PACKAGE_NAME"/"PACKAGE_VERSION); + if (buffer_is_empty(con->conf.server_tag)) { + cgi_env_add(&env, CONST_STR_LEN("SERVER_SOFTWARE"), PACKAGE_NAME"/"PACKAGE_VERSION); + } else { + cgi_env_add(&env, CONST_STR_LEN("SERVER_SOFTWARE"), con->conf.server_tag); + } + cgi_env_add(&env, CONST_STR_LEN("SERVER_NAME"), con->server_name->used ? con->server_name->ptr : --- mod_scgi.c.orig Mon Oct 31 15:58:07 2005 +++ mod_scgi.c Mon Nov 7 11:05:37 2005 @@ -1434,8 +1434,12 @@ scgi_env_add(p->scgi_env, CONST_STR_LEN("SCGI"), CONST_STR_LEN("1")); - scgi_env_add(p->scgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_STR_LEN(PACKAGE_NAME"/"PACKAGE_VERSION)); - + if (buffer_is_empty(con->conf.server_tag)) { + scgi_env_add(p->scgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_STR_LEN(PACKAGE_NAME"/"PACKAGE_VERSION)); + } else { + scgi_env_add(p->scgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_BUF_LEN(con->conf.server_tag)); + } + if (con->server_name->used) { scgi_env_add(p->scgi_env, CONST_STR_LEN("SERVER_NAME"), CONST_BUF_LEN(con->server_name)); } else { --- mod_fastcgi.c.orig Mon Oct 31 15:57:03 2005 +++ mod_fastcgi.c Mon Nov 7 11:05:37 2005 @@ -1649,8 +1649,12 @@ buffer_prepare_copy(p->fcgi_env, 1024); - fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_STR_LEN(PACKAGE_NAME"/"PACKAGE_VERSION)); - + if (buffer_is_empty(con->conf.server_tag)) { + fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_STR_LEN(PACKAGE_NAME"/"PACKAGE_VERSION)); + } else { + fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_BUF_LEN(con->conf.server_tag)); + } + if (con->server_name->used) { fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_NAME"), CONST_BUF_LEN(con->server_name)); } else {
-- aw
Updated by stbuehler over 15 years ago
- Target version set to 1.4.23
- Pending set to No
- Patch available set to No
Updated by stbuehler over 15 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r2471.
Actions
Also available in: Atom