diff options
author | Jan Kneschke <jan@kneschke.de> | 2005-08-08 10:27:07 +0000 |
---|---|---|
committer | Jan Kneschke <jan@kneschke.de> | 2005-08-08 10:27:07 +0000 |
commit | c8408d015cfb2ecf01082f2dd0fa7ea99e5f505d (patch) | |
tree | 36ae9983efbe783a9c35630dfc44774459b7c0ec /src/mod_setenv.c | |
parent | 5c26d86fd24c8db56d3f99ff3884359f8229b7ca (diff) | |
download | lighttpd-git-c8408d015cfb2ecf01082f2dd0fa7ea99e5f505d.tar.gz |
removed setup_connection (merged [295])
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@512 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_setenv.c')
-rw-r--r-- | src/mod_setenv.c | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/src/mod_setenv.c b/src/mod_setenv.c index 07df0a84..ca97a38b 100644 --- a/src/mod_setenv.c +++ b/src/mod_setenv.c @@ -105,16 +105,18 @@ SETDEFAULTS_FUNC(mod_setenv_set_defaults) { #define PATCH(x) \ p->conf.x = s->x; -static int mod_setenv_patch_connection(server *srv, connection *con, plugin_data *p, const char *stage, size_t stage_len) { +static int mod_setenv_patch_connection(server *srv, connection *con, plugin_data *p) { size_t i, j; + plugin_config *s = p->config_storage[0]; + + PATCH(request_header); + PATCH(response_header); + PATCH(environment); /* skip the first, the global context */ for (i = 1; i < srv->config_context->used; i++) { data_config *dc = (data_config *)srv->config_context->data[i]; - plugin_config *s = p->config_storage[i]; - - /* not our stage */ - if (!buffer_is_equal_string(dc->comp_key, stage, stage_len)) continue; + s = p->config_storage[i]; /* condition didn't match */ if (!config_check_cond(srv, con, dc)) continue; @@ -135,30 +137,13 @@ static int mod_setenv_patch_connection(server *srv, connection *con, plugin_data return 0; } - -static int mod_setenv_setup_connection(server *srv, connection *con, plugin_data *p) { - plugin_config *s = p->config_storage[0]; - UNUSED(srv); - UNUSED(con); - - PATCH(request_header); - PATCH(response_header); - PATCH(environment); - - return 0; -} #undef PATCH URIHANDLER_FUNC(mod_setenv_uri_handler) { plugin_data *p = p_d; size_t k, i; - mod_setenv_setup_connection(srv, con, p); - for (i = 0; i < srv->config_patches->used; i++) { - buffer *patch = srv->config_patches->ptr[i]; - - mod_setenv_patch_connection(srv, con, p, CONST_BUF_LEN(patch)); - } + mod_setenv_patch_connection(srv, con, p); for (k = 0; k < p->conf.request_header->used; k++) { data_string *ds = (data_string *)p->conf.request_header->data[k]; |