tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/webapp/apache-2.0 mod_webapp.c
Date Thu, 06 Sep 2001 17:00:54 GMT
jfclere     01/09/06 10:00:54

  Modified:    jk/native/apache-2.0 mod_jk.c
               webapp/apache-2.0 mod_webapp.c
  Log:
  Arrange apache-2.0 support (like in mod_jk.c).
  Submitted by:	Ryan Bloom, rbb@covalent.net
  
  Revision  Changes    Path
  1.23      +2 -2      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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mod_jk.c	2001/09/06 13:39:29	1.22
  +++ mod_jk.c	2001/09/06 17:00:54	1.23
  @@ -60,7 +60,7 @@
    * Description: Apache 2 plugin for Jakarta/Tomcat                         *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
    *                 Henri Gomez <hgomez@slib.fr>                               *
  - * Version:     $Revision: 1.22 $                                           *
  + * Version:     $Revision: 1.23 $                                           *
    ***************************************************************************/
   
   /*
  @@ -1329,7 +1329,7 @@
   static int jk_map_to_storage(request_rec *r)
   {
       if (apr_table_get(r->notes, JK_WORKER_ID)) {
  -        r->filename = apr_filename_of_pathname(r->uri);
  +        r->filename = (char *)apr_filename_of_pathname(r->uri);
           return OK;
       }
       return DECLINED;
  
  
  
  1.2       +18 -1     jakarta-tomcat-connectors/webapp/apache-2.0/mod_webapp.c
  
  Index: mod_webapp.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/apache-2.0/mod_webapp.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_webapp.c	2001/08/21 16:20:58	1.1
  +++ mod_webapp.c	2001/09/06 17:00:54	1.2
  @@ -57,7 +57,7 @@
   
   /**
    * @author  Pier Fumagalli <mailto:pier.fumagalli@eng.sun.com>
  - * @version $Id: mod_webapp.c,v 1.1 2001/08/21 16:20:58 pier Exp $
  + * @version $Id: mod_webapp.c,v 1.2 2001/09/06 17:00:54 jfclere Exp $
    */
   
   #include <httpd.h>
  @@ -413,6 +413,9 @@
   
       /* The uri path is matched: set the handler and return */
       r->handler=apr_pstrdup(r->pool,"webapp-handler");
  +#if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
  +    apr_table_setn(r->notes,"webapp-handler", "webapp-handler");
  +#endif
   
       /* Set the webapp request structure into Apache's request structure */
       ap_set_module_config(r->request_config, &webapp_module, appl);
  @@ -507,12 +510,26 @@
       return(OK);
   }
   
  +#if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
  +/* bypass the directory_walk and file_walk for non-file requests */
  +static int wam_map_to_storage(request_rec *r)
  +{
  +    if (apr_table_get(r->notes, "webapp-handler")) {
  +        r->filename = (char *)apr_filename_of_pathname(r->uri);
  +        return OK;
  +    }
  +    return DECLINED;
  +}
  +#endif
   
   static void register_hooks(apr_pool_t *p)
   {
       ap_hook_handler(wam_invoke, NULL, NULL, APR_HOOK_MIDDLE);
       ap_hook_translate_name(wam_match, NULL, NULL, APR_HOOK_MIDDLE);
       ap_hook_child_init(wam_startup, NULL, NULL, APR_HOOK_MIDDLE);
  +#if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
  +    ap_hook_map_to_storage(wam_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);
  +#endif
   }
   
   /* Apache module declaration */
  
  
  

Mime
View raw message