tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c
Date Wed, 24 Jul 2002 02:38:32 GMT
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:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message