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/native2/server/apache2 mod_jk2.c
Date Sat, 20 Jul 2002 12:33:58 GMT
bojan       2002/07/20 05:33:58

  Modified:    jk/native2/server/apache2 mod_jk2.c
  Log:
  Revert MT's fix for the order of hooks. Apply the fix similar to fix for 9913.
  
  Revision  Changes    Path
  1.43      +23 -4     jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c
  
  Index: mod_jk2.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- mod_jk2.c	18 Jul 2002 15:15:00 -0000	1.42
  +++ mod_jk2.c	20 Jul 2002 12:33:58 -0000	1.43
  @@ -708,12 +708,31 @@
       jk_uriEnv_t *uriEnv=ap_get_module_config( r->request_config, &jk2_module );
       
       if( uriEnv != NULL ) {
  -        r->filename = (char *)apr_filename_of_pathname(r->uri);
  +        char *uri_p=r->uri;
  +
  +        /* This is old code which doesn't seem to work well with mod_dir
  +            r->filename = (char *)apr_filename_of_pathname(r->uri); */
  +
           /*         if( uriEnv->mbean->debug > 0 ) { */
               /*   env->l->jkLog(env, env->l, JK_LOG_INFO,  */
               /*     "mod_jk.map_to_storage(): map %s %s\n", */
               /*                  r->uri, r->filename); */
           /* } */
  +
  +        /* Absolute paths cannot be merged */
  +        if(r->uri[0] == '/') ++uri_p;
  +
  +        /* Need absolute path to stat */
  +        if (apr_filepath_merge(&r->filename, ap_document_root(r), uri_p,
  +                               APR_FILEPATH_SECUREROOT | APR_FILEPATH_TRUENAME,
  +                               r->pool)
  +            != APR_SUCCESS){
  +          return DECLINED;
  +        }
  +
  +        /* Stat the file so that mod_dir knows it's there */
  +        apr_stat(&r->finfo, r->filename, APR_FINFO_TYPE, r->pool);
  +
           return OK;
       }
       return DECLINED;
  @@ -724,8 +743,8 @@
       ap_hook_handler(jk2_handler, NULL, NULL, APR_HOOK_MIDDLE);
       ap_hook_post_config(jk2_post_config,NULL,NULL,APR_HOOK_MIDDLE);
       ap_hook_child_init(jk2_child_init,NULL,NULL,APR_HOOK_MIDDLE);
  -    ap_hook_translate_name(jk2_translate,NULL,NULL,APR_HOOK_MIDDLE);
  -    ap_hook_map_to_storage(jk2_map_to_storage, NULL, NULL, APR_HOOK_FIRST);
  +    ap_hook_translate_name(jk2_translate,NULL,NULL,APR_HOOK_FIRST);
  +    ap_hook_map_to_storage(jk2_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);
   }
   
   module AP_MODULE_DECLARE_DATA jk2_module =
  
  
  

--
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