You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GOMEZ Henri <hg...@slib.fr> on 2000/09/11 17:15:21 UTC

mod_jk patch

Hi,

This patch ALLOW mod_jk to work with Apache 1.3 and 
WITH mod_php/mod_perl which wasn't the case of 
the previously sent.

Thanks to keep me informed 

-
Unix is like a 'hogan' -- no Gates, no Windows, and an Apache inside. 


Re: mod_jk patch

Posted by "Pier P. Fumagalli" <pi...@eng.sun.com>.
GOMEZ Henri wrote:
> 
> Hi,
> 
> This patch ALLOW mod_jk to work with Apache 1.3 and
> WITH mod_php/mod_perl which wasn't the case of
> the previously sent.
> 
> Thanks to keep me informed

Reading the patch...

--- src/native/apache1.3/mod_jk.c.orig	Mon Sep 11 17:18:44 2000
+++ src/native/apache1.3/mod_jk.c	Mon Sep 11 17:19:37 2000
@@ -823,13 +823,10 @@
 
 static void jk_init(server_rec *s, ap_pool *p)
 {
-    char *env = getenv("WAS_BORN_BY_APACHE");
     jk_map_t *init_map = NULL;
     jk_server_conf_t *conf =
         (jk_server_conf_t *)ap_get_module_config(s->module_config,
&jk_module);
 
-    fprintf(stdout, "jk_post_config %s\n", env ? env : "NULL");
fflush(stdout);
-        
     if(conf->log_file && conf->log_level >= 0) {
         if(!jk_open_file_logger(&(conf->log), 
                                 conf->log_file, 
@@ -850,14 +847,15 @@
 
     if(map_alloc(&init_map)) {
         if(map_read_properties(init_map, conf->worker_file)) {
-            if(!env) {
-                putenv("WAS_BORN_BY_APACHE=true");
-                return;
-            } else {
+
+#if MODULE_MAGIC_NUMBER >= 19980527
+    			/* Tell apache we're here */
+    			ap_add_version_component("mod_jk");
+#endif
+
                 if(wc_open(init_map, conf->log)) {
                     return;
                 }            
-            }
         }
     }

I don't understand why you're chainging an environment and replacing it
with ap_add_Version_component().... Is this _required_ for mod_perl/php
proper operation?

@@ -882,7 +880,6 @@
             if(worker) {
                 r->handler = ap_pstrdup(r->pool, JK_HANDLER);
                 ap_table_setn(r->notes, JK_WORKER_ID, worker);
-                return OK;
             }
         }
     }

This seems to be the only one (AFAICS) that does the trick....

	Pier