Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 363 invoked from network); 24 Jul 2002 02:38:43 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 24 Jul 2002 02:38:43 -0000 Received: (qmail 25246 invoked by uid 97); 24 Jul 2002 02:39:04 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 25230 invoked by uid 97); 24 Jul 2002 02:39:03 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 25219 invoked by uid 97); 24 Jul 2002 02:39:03 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: 24 Jul 2002 02:38:32 -0000 Message-ID: <20020724023832.41940.qmail@icarus.apache.org> From: bojan@apache.org To: jakarta-tomcat-connectors-cvs@apache.org Subject: cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bojan 2002/07/23 19:38:32 Modified: jk/native/apache-2.0 mod_jk.c Log: Refine directory handling a bit more. Make use of the new JkOption, ForwardDirectories. When enabled, all unresolved directory requests go to Tomcat. This option is disabled by default. Revision Changes Path 1.53 +21 -6 jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c Index: mod_jk.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- mod_jk.c 22 Jul 2002 21:03:19 -0000 1.52 +++ mod_jk.c 24 Jul 2002 02:38:32 -0000 1.53 @@ -959,7 +959,8 @@ * -ForwardSSLKeySize => Don't Forward SSL Key Size, will make mod_jk works with all TC release * ForwardURICompat => Forward URI normally, less spec compliant but mod_rewrite compatible (old TC) * ForwardURICompatUnparsed => Forward URI as unparsed, spec compliant but broke mod_rewrite (old TC) - * ForwardURIEscaped => Forward URI escaped and Tomcat (3.3 rc2) stuff will do the decoding part + * ForwardURIEscaped => Forward URI escaped and Tomcat (3.3 rc2) stuff will do the decoding part + * ForwardDirectories => Forward all directory requests with no index files to Tomcat */ const char *jk_set_options(cmd_parms *cmd, @@ -1000,6 +1001,9 @@ opt = JK_OPT_FWDURIESCAPED; mask = JK_OPT_FWDURIMASK; } + else if (!strcasecmp(w, "ForwardDirectories")) { + opt = JK_OPT_FWDDIRS; + } else return ap_pstrcat(cmd->pool, "JkOptions: Illegal option '", w, "'", NULL); @@ -1183,20 +1187,26 @@ /* We do DIR_MAGIC_TYPE here to make sure TC gets all requests, even * if they are directory requests, in case there are no static files - * visible to Apache and/or DirectoryIndex was not used */ + * visible to Apache and/or DirectoryIndex was not used. This is only + * used when JkOptions has ForwardDirectories set. */ - /* not for me, try next handler */ + /* Not for me, try next handler */ if(strcmp(r->handler,JK_HANDLER) && strcmp(r->handler,DIR_MAGIC_TYPE)) - return DECLINED; + return DECLINED; xconf = (jk_server_conf_t *)ap_get_module_config(r->server->module_config, &jk_module); + + /* Was the option to forward directories to Tomcat set? */ + if(!strcmp(r->handler,DIR_MAGIC_TYPE) && !(xconf->options & JK_OPT_FWDDIRS)) + return DECLINED; + worker_name = apr_table_get(r->notes, JK_WORKER_ID); xl = xconf->log ? xconf->log : main_log; /* Set up r->read_chunked flags for chunked encoding, if present */ if(rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) { - return rc; + return rc; } if( worker_name == NULL ) { @@ -1610,6 +1620,11 @@ if(worker) { r->handler=apr_pstrdup(r->pool,JK_HANDLER); apr_table_setn(r->notes, JK_WORKER_ID, worker); + + /* This could be a sub-request, possibly from mod_dir */ + if(r->main) + apr_table_setn(r->main->notes, JK_WORKER_ID, worker); + return OK; } } -- To unsubscribe, e-mail: For additional commands, e-mail: