stas        2003/03/02 04:16:10

  Modified:    src/modules/perl mod_perl.c
               .        Changes
  Log:
  make sure that the non-tied STDOUT is buffered before calling the perl
  response handler.
  
  Revision  Changes    Path
  1.152     +10 -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.151
  retrieving revision 1.152
  diff -u -r1.151 -r1.152
  --- mod_perl.c        4 Feb 2003 06:52:15 -0000       1.151
  +++ mod_perl.c        2 Mar 2003 12:16:10 -0000       1.152
  @@ -745,10 +745,12 @@
       return modperl_wbucket_flush(rcfg->wbucket);
   }
   
  -static int modperl_response_handler_run(request_rec *r, int finish)
  +static int modperl_response_handler_run(pTHX_ request_rec *r, int finish)
   {
       int retval;
   
  +    IoFLUSH_off(PL_defoutgv); /* $|=0 */
  +    
       modperl_response_init(r);
   
       retval = modperl_callback_per_dir(MP_RESPONSE_HANDLER, r);
  @@ -769,11 +771,16 @@
   
   int modperl_response_handler(request_rec *r)
   {
  +    dTHX;
  +
       if (!strEQ(r->handler, "modperl")) {
           return DECLINED;
       }
  +    
  +    /* XXX: modperl_response_handler should select perl interpreter
  +     * just like modperl_response_handler_cgi does */
   
  -    return modperl_response_handler_run(r, TRUE);
  +    return modperl_response_handler_run(aTHX_ r, TRUE);
   }
   
   int modperl_response_handler_cgi(request_rec *r)
  @@ -816,7 +823,7 @@
   
       modperl_env_request_tie(aTHX_ r);
   
  -    retval = modperl_response_handler_run(r, FALSE);
  +    retval = modperl_response_handler_run(aTHX_ r, FALSE);
   
       modperl_io_handle_untie(aTHX_ h_stdout);
       modperl_io_handle_untie(aTHX_ h_stdin);
  
  
  
  1.137     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.136
  retrieving revision 1.137
  diff -u -r1.136 -r1.137
  --- Changes   2 Mar 2003 10:30:56 -0000       1.136
  +++ Changes   2 Mar 2003 12:16:10 -0000       1.137
  @@ -10,6 +10,9 @@
   
   =item 1.99_09-dev
   
  +make sure that the non-tied STDOUT is buffered before calling the perl
  +response handler. [Stas]
  +
   fix the input filters handling of DECLINED handlers (consume the data,
   on behalf of the handler) + tests [Stas]
   
  
  
  

Reply via email to