Browse Source

Use server.tag for SERVER_SOFTWARE if configured (fixes #357)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2471 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.23
Stefan Bühler 13 years ago
parent
commit
2e823e8d14
  1. 1
      NEWS
  2. 6
      src/mod_cgi.c
  3. 6
      src/mod_fastcgi.c
  4. 6
      src/mod_scgi.c

1
NEWS

@ -20,6 +20,7 @@ NEWS
* Include mmap.h from chunk.h to fix some problems with #define mmap mmap64 (fixes #1923)
* Add support for pipe logging for server.errorlog (fixes #296)
* Add revision number to package version for svn/git checkouts
* Use server.tag for SERVER_SOFTWARE if configured (fixes #357)
- 1.4.22 - 2009-03-07
* Fix wrong lua type for CACHE_MISS/CACHE_HIT in mod_cml (fixes #533)

6
src/mod_cgi.c

@ -784,7 +784,11 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
env.size = 0;
env.used = 0;
cgi_env_add(&env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_STR_LEN(PACKAGE_DESC));
if (buffer_is_empty(con->conf.server_tag)) {
cgi_env_add(&env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_STR_LEN(PACKAGE_DESC));
} else {
cgi_env_add(&env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_BUF_LEN(con->conf.server_tag));
}
if (!buffer_is_empty(con->server_name)) {
size_t len = con->server_name->used - 1;

6
src/mod_fastcgi.c

@ -1884,7 +1884,11 @@ static int fcgi_create_env(server *srv, handler_ctx *hctx, size_t request_id) {
buffer_prepare_copy(p->fcgi_env, 1024);
FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_STR_LEN(PACKAGE_DESC)),con)
if (buffer_is_empty(con->conf.server_tag)) {
FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_STR_LEN(PACKAGE_DESC)),con)
} else {
FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_BUF_LEN(con->conf.server_tag)),con)
}
if (con->server_name->used) {
size_t len = con->server_name->used - 1;

6
src/mod_scgi.c

@ -1463,7 +1463,11 @@ static int scgi_create_env(server *srv, handler_ctx *hctx) {
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_DESC));
if (buffer_is_empty(con->conf.server_tag)) {
scgi_env_add(p->scgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_STR_LEN(PACKAGE_DESC));
} else {
scgi_env_add(p->scgi_env, CONST_STR_LEN("SERVER_SOFTWARE"), CONST_BUF_LEN(con->conf.server_tag));
}
if (con->server_name->used) {
size_t len = con->server_name->used - 1;

Loading…
Cancel
Save