Author: rjung
Date: Sun Nov 19 09:36:56 2006
New Revision: 476856
URL: http://svn.apache.org/viewvc?view=rev&rev=476856
Log:
Allowing the following directives in Apache 2.x
only in the main server, not in vhosts:
- JkWorkersFile
- JkWorkerProperty
- JkShmFile
- JkShmSize
They are truly global and neither work, nor make sense
in a vhost.
Modified:
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL:
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diff&rev=476856&r1=476855&r2=476856
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Nov 19 09:36:56
2006
@@ -901,6 +901,11 @@
(jk_server_conf_t *) ap_get_module_config(s->module_config,
&jk_module);
+ const char *err_string = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+ if (err_string != NULL) {
+ return err_string;
+ }
+
/* we need an absolut path (ap_server_root_relative does the ap_pstrdup) */
conf->worker_file = ap_server_root_relative(cmd->pool, worker_file);
@@ -976,6 +981,11 @@
static const char *jk_set_shm_file(cmd_parms * cmd,
void *dummy, const char *shm_file)
{
+ const char *err_string = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+ if (err_string != NULL) {
+ return err_string;
+ }
+
/* we need an absolute path */
jk_shm_file = ap_server_root_relative(cmd->pool, shm_file);
if (jk_shm_file == NULL)
@@ -994,7 +1004,11 @@
void *dummy, const char *shm_size)
{
int sz = 0;
- /* we need an absolute path */
+ const char *err_string = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+ if (err_string != NULL) {
+ return err_string;
+ }
+
sz = atoi(shm_size) * 1024;
if (sz < JK_SHM_DEF_SIZE)
sz = JK_SHM_DEF_SIZE;
@@ -1682,6 +1696,11 @@
jk_server_conf_t *conf =
(jk_server_conf_t *) ap_get_module_config(s->module_config,
&jk_module);
+
+ const char *err_string = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+ if (err_string != NULL) {
+ return err_string;
+ }
if (jk_map_read_property(conf->worker_properties, line, conf->log) ==
JK_FALSE)
return apr_pstrcat(cmd->temp_pool, "Invalid JkWorkerProperty ", line);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]