tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r446930 - in /tomcat/connectors/trunk/jk/native: apache-1.3/mod_jk.c apache-2.0/mod_jk.c
Date Sat, 16 Sep 2006 19:51:02 GMT
Author: rjung
Date: Sat Sep 16 12:51:02 2006
New Revision: 446930

URL: http://svn.apache.org/viewvc?view=rev&rev=446930
Log:
Add the missing no-jk feature to apache 1.3 and a missing
JK_IS_DEBUG_LEVEL to the no-jk impl in apache 2.0.

Modified:
    tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
    tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=446930&r1=446929&r2=446930
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sat Sep 16 12:51:02 2006
@@ -1793,17 +1793,26 @@
  */
 static int jk_handler(request_rec * r)
 {
-    /* Retrieve the worker name stored by jk_translate() */
-    const char *worker_name = ap_table_get(r->notes, JK_NOTE_WORKER_NAME);
     jk_server_conf_t *conf =
         (jk_server_conf_t *) ap_get_module_config(r->server->
                                                   module_config,
                                                   &jk_module);
     jk_logger_t *l = conf->log ? conf->log : main_log;
+    /* Retrieve the worker name stored by jk_translate() */
+    const char *worker_name = ap_table_get(r->notes, JK_NOTE_WORKER_NAME);
     int rc;
 
     JK_TRACE_ENTER(l);
 
+    if (ap_table_get(r->subprocess_env, "no-jk")) {
+        if (JK_IS_DEBUG_LEVEL(l))
+            jk_log(l, JK_LOG_DEBUG,
+                   "Into handler no-jk env var detected for uri=%s, declined",
+                   r->uri);
+        JK_TRACE_EXIT(l);
+        return DECLINED;
+    }
+
     if (r->proxyreq) {
         jk_log(l, JK_LOG_ERROR,
                "Request has proxyreq flag set in mod_jk handler - aborting.");
@@ -2321,6 +2330,14 @@
             char *clean_uri = ap_pstrdup(r->pool, r->uri);
             const char *worker;
 
+            if (ap_table_get(r->subprocess_env, "no-jk")) {
+                if (JK_IS_DEBUG_LEVEL(l))
+                    jk_log(l, JK_LOG_DEBUG,
+                           "Into translate no-jk env var detected for uri=%s, declined",
+                           r->uri);
+                return DECLINED;
+            }
+
             ap_no2slash(clean_uri);
             worker = map_uri_to_worker(conf->uw_map, clean_uri, l);
 
@@ -2443,15 +2460,23 @@
     if (r->main) {
         jk_server_conf_t *conf = (jk_server_conf_t *)
             ap_get_module_config(r->server->module_config, &jk_module);
+        jk_logger_t *l = conf->log ? conf->log : main_log;
         char *worker = (char *)ap_table_get(r->notes, JK_NOTE_WORKER_NAME);
 
+        if (ap_table_get(r->subprocess_env, "no-jk")) {
+            if (JK_IS_DEBUG_LEVEL(l))
+                jk_log(l, JK_LOG_DEBUG,
+                       "Into fixup no-jk env var detected for uri=%s, declined",
+                       r->uri);
+            return DECLINED;
+        }
+
         /* Only if we have no worker and ForwardDirectories is set */
         if (!worker && (conf->options & JK_OPT_FWDDIRS)) {
             char *dummy_ptr[1], **names_ptr, *idx;
             int num_names;
             dir_config_rec *d = (dir_config_rec *)
                 ap_get_module_config(r->per_dir_config, &dir_module);
-            jk_logger_t *l = conf->log ? conf->log : main_log;
 
             /* Direct lift from mod_dir */
             if (d->index_names) {

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=446930&r1=446929&r2=446930
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sat Sep 16 12:51:02 2006
@@ -1853,9 +1853,10 @@
                                                       &jk_module);
     JK_TRACE_ENTER(xconf->log);
     if (apr_table_get(r->subprocess_env, "no-jk")) {
-        jk_log(xconf->log, JK_LOG_DEBUG,
-               "Into handler no-jk env var detected for uri=%s, declined",
-               r->uri);
+        if (JK_IS_DEBUG_LEVEL(xconf->log))
+            jk_log(xconf->log, JK_LOG_DEBUG,
+                   "Into handler no-jk env var detected for uri=%s, declined",
+                   r->uri);
 
         JK_TRACE_EXIT(xconf->log);
         return DECLINED;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message