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

2001-05-13 Thread dougm

dougm   01/05/13 20:34:34

  Modified:src/modules/perl mod_perl.c
  Log:
  modperl_response_handler_cgi(): flush output buffer after interpreter is putback
  
  Revision  ChangesPath
  1.58  +9 -4  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.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- mod_perl.c2001/05/14 03:30:39 1.57
  +++ mod_perl.c2001/05/14 03:34:34 1.58
  @@ -362,7 +362,7 @@
   modperl_wbucket_flush(&rcfg->wbucket);
   }
   
  -static int modperl_response_handler_run(request_rec *r)
  +static int modperl_response_handler_run(request_rec *r, int finish)
   {
   int retval;
   
  @@ -374,7 +374,9 @@
   r->handler = r->content_type; /* let http_core or whatever try */
   }
   
  -modperl_response_finish(r);
  +if (finish) {
  +modperl_response_finish(r);
  +}
   
   return retval;
   }
  @@ -385,7 +387,7 @@
   return DECLINED;
   }
   
  -return modperl_response_handler_run(r);
  +return modperl_response_handler_run(r, TRUE);
   }
   
   int modperl_response_handler_cgi(request_rec *r)
  @@ -419,7 +421,7 @@
   h_stdin  = modperl_io_tie_stdin(aTHX_ r);
   
   modperl_env_request_tie(aTHX_ r);
  -retval = modperl_response_handler_run(r);
  +retval = modperl_response_handler_run(r, FALSE);
   
   modperl_io_handle_untie(aTHX_ h_stdout);
   modperl_io_handle_untie(aTHX_ h_stdin);
  @@ -433,6 +435,9 @@
   rcfg->interp = NULL;
   }
   #endif
  +
  +/* flush output buffer after interpreter is putback */
  +modperl_response_finish(r);
   
   return retval;
   }
  
  
  



cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm

2001-05-13 Thread dougm

dougm   01/05/13 20:30:40

  Modified:src/modules/perl mod_perl.c modperl_interp.c modperl_types.h
   t/response/TestApache cgihandler.pm
  Log:
  make modperl_response_handler_cgi() deal properly with "PerlInterpScope handler"
  
  Revision  ChangesPath
  1.57  +11 -0 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.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- mod_perl.c2001/05/08 21:08:24 1.56
  +++ mod_perl.c2001/05/14 03:30:39 1.57
  @@ -406,6 +406,9 @@
   #ifdef USE_ITHREADS
   interp = modperl_interp_select(r, r->connection, r->server);
   aTHX = interp->perl;
  +if (MpInterpPUTBACK(interp)) {
  +rcfg->interp = interp;
  +}
   #endif
   
   if (MpDirPARSE_HEADERS(dcfg)) {
  @@ -422,6 +425,14 @@
   modperl_io_handle_untie(aTHX_ h_stdin);
   
   modperl_env_request_untie(aTHX_ r);
  +
  +#ifdef USE_ITHREADS
  +if (MpInterpPUTBACK(interp)) {
  +/* PerlInterpScope handler */
  +modperl_interp_unselect(interp);
  +rcfg->interp = NULL;
  +}
  +#endif
   
   return retval;
   }
  
  
  
  1.33  +13 -0 modperl-2.0/src/modules/perl/modperl_interp.c
  
  Index: modperl_interp.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- modperl_interp.c  2001/04/25 05:27:17 1.32
  +++ modperl_interp.c  2001/05/14 03:30:39 1.33
  @@ -248,6 +248,7 @@
   server_rec *s)
   {
   MP_dSCFG(s);
  +MP_dRCFG;
   modperl_config_dir_t *dcfg = modperl_config_dir_get(r);
   const char *desc = NULL;
   modperl_interp_t *interp = NULL;
  @@ -263,6 +264,18 @@
   /* XXX: if no VirtualHosts w/ PerlOptions +Parent we can skip this */
   PERL_SET_CONTEXT(scfg->mip->parent->perl);
   return scfg->mip->parent;
  +}
  +
  +if (rcfg && rcfg->interp) {
  +/* if scope is per-handler and something selected an interpreter
  + * before modperl_callback_run_handlers() and is still holding it,
  + * e.g. modperl_response_handler_cgi(), that interpreter will
  + * be here
  + */
  +MP_TRACE_i(MP_FUNC,
  +   "found interp 0x%lx in request config\n",
  +   (unsigned long)rcfg->interp);
  +return rcfg->interp;
   }
   
   /*
  
  
  
  1.41  +1 -0  modperl-2.0/src/modules/perl/modperl_types.h
  
  Index: modperl_types.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- modperl_types.h   2001/05/08 21:08:30 1.40
  +++ modperl_types.h   2001/05/14 03:30:39 1.41
  @@ -204,6 +204,7 @@
   modperl_wbucket_t wbucket;
   MpAV *handlers_per_dir[MP_HANDLER_NUM_PER_DIR];
   MpAV *handlers_per_srv[MP_HANDLER_NUM_PER_SRV];
  +modperl_interp_t *interp;
   } modperl_config_req_t;
   
   typedef struct {
  
  
  
  1.3   +1 -0  modperl-2.0/t/response/TestApache/cgihandler.pm
  
  Index: cgihandler.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/cgihandler.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- cgihandler.pm 2001/05/08 04:25:50 1.2
  +++ cgihandler.pm 2001/05/14 03:30:40 1.3
  @@ -32,3 +32,4 @@
   1;
   __END__
   SetHandler perl-script
  +PerlInterpScope handler
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-05-13 Thread dougm

dougm   01/05/13 19:41:50

  Modified:lib/Apache Build.pm
  Log:
  add new -Dthinger so we compile when apache is built with maintainer mode
  
  Revision  ChangesPath
  1.44  +1 -0  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Build.pm  2001/04/27 21:12:25 1.43
  +++ Build.pm  2001/05/14 02:41:49 1.44
  @@ -123,6 +123,7 @@
   if ($self->perl_config('gccversion')) {
   #same as --with-maintainter-mode
   $ccopts .= " $Wall -DAP_DEBUG";
  +$ccopts .= " -DAP_HAVE_DESIGNATED_INITIALIZER";
   }
   }