You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2002/02/26 19:00:58 UTC

cvs commit: modperl-2.0/src/modules/perl mod_perl.c

dougm       02/02/26 10:00:58

  Modified:    src/modules/perl mod_perl.c
  Log:
  fixing bugs when mod_perl is invoked via mod_include include virtual:
  - modperl_response_init needs to initialize wbucket in subrequests
    where there is no wbucket in the main request
  - modperl_response_handler_cgi needs to always tie/untie *STD{IN,OUT}
    and %ENV regardless of being in the main request or a subrequest
  
  Revision  Changes    Path
  1.107     +8 -12     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.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- mod_perl.c	21 Feb 2002 01:45:34 -0000	1.106
  +++ mod_perl.c	26 Feb 2002 18:00:58 -0000	1.107
  @@ -590,8 +590,8 @@
       MP_dDCFG;
       modperl_wbucket_t *wb = rcfg->wbucket;
   
  -    if (r->main) {
  -        return;
  +    if (r->main && wb->pool) {
  +        return; /* using bucket from main request */
       }
   
       /* setup buffer for output */
  @@ -668,21 +668,17 @@
           modperl_env_request_populate(aTHX_ r);
       }
   
  -    if (!r->main) {
  -        h_stdout = modperl_io_tie_stdout(aTHX_ r);
  -        h_stdin  = modperl_io_tie_stdin(aTHX_ r);
  +    h_stdout = modperl_io_tie_stdout(aTHX_ r);
  +    h_stdin  = modperl_io_tie_stdin(aTHX_ r);
   
  -        modperl_env_request_tie(aTHX_ r);
  -    }
  +    modperl_env_request_tie(aTHX_ r);
   
       retval = modperl_response_handler_run(r, FALSE);
   
  -    if (!r->main) {
  -        modperl_io_handle_untie(aTHX_ h_stdout);
  -        modperl_io_handle_untie(aTHX_ h_stdin);
  +    modperl_io_handle_untie(aTHX_ h_stdout);
  +    modperl_io_handle_untie(aTHX_ h_stdin);
   
  -        modperl_env_request_untie(aTHX_ r);
  -    }
  +    modperl_env_request_untie(aTHX_ r);
   
       modperl_perl_global_request_restore(aTHX_ r);