dougm       01/04/11 20:24:45

  Modified:    src/modules/perl mod_perl.c modperl_handler.c
  Log:
  use create_request hook to create mod_perl per-request config
  
  Revision  Changes    Path
  1.46      +14 -3     modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- mod_perl.c        2001/04/12 01:03:14     1.45
  +++ mod_perl.c        2001/04/12 03:24:45     1.46
  @@ -235,6 +235,15 @@
   #endif
   }
   
  +static int modperl_hook_create_request(request_rec *r)
  +{
  +    MP_dRCFG;
  +
  +    modperl_config_req_init(r, rcfg);
  +
  +    return OK;
  +}
  +
   void modperl_register_hooks(apr_pool_t *p)
   {
       ap_hook_open_logs(modperl_hook_init, NULL, NULL, APR_HOOK_MIDDLE);
  @@ -247,8 +256,12 @@
       ap_register_output_filter(MODPERL_OUTPUT_FILTER_NAME,
                                 modperl_output_filter_handler,
                                 AP_FTYPE_CONTENT);
  +
  +    ap_hook_create_request(modperl_hook_create_request, NULL, NULL,
  +                           APR_HOOK_MIDDLE);
   
  -    ap_hook_post_config(modperl_hook_post_config, NULL, NULL, APR_HOOK_MIDDLE);
  +    ap_hook_post_config(modperl_hook_post_config, NULL, NULL,
  +                        APR_HOOK_MIDDLE);
   
       modperl_register_handler_hooks();
   }
  @@ -280,8 +293,6 @@
   void modperl_response_init(request_rec *r)
   {
       MP_dRCFG;
  -
  -    modperl_config_req_init(r, rcfg);
   
       /* setup buffer for output */
       rcfg->wbucket.pool = r->pool;
  
  
  
  1.8       +0 -4      modperl-2.0/src/modules/perl/modperl_handler.c
  
  Index: modperl_handler.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_handler.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_handler.c 2001/03/26 01:08:29     1.7
  +++ modperl_handler.c 2001/04/12 03:24:45     1.8
  @@ -239,10 +239,6 @@
           return FALSE;
       }
   
  -    if (r) {
  -        modperl_config_req_init(r, rcfg);
  -    }
  -
       return modperl_handler_lookup_handlers(dcfg, scfg, rcfg, p,
                                              type, idx,
                                              action, NULL);
  
  
  

Reply via email to