cvs commit: modperl-2.0/ModPerl-Registry TODO

2002-11-25 Thread stas
stas2002/11/25 23:47:26

  Modified:ModPerl-Registry TODO
  Log:
  Apache::HEADRegistry >> registry core nice to have todo list
  
  Revision  ChangesPath
  1.10  +5 -0  modperl-2.0/ModPerl-Registry/TODO
  
  Index: TODO
  ===
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/TODO,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TODO  16 Aug 2002 09:01:17 -  1.9
  +++ TODO  26 Nov 2002 07:47:26 -  1.10
  @@ -60,6 +60,11 @@
   
   ### nice to have ###
   
  +- Geoffrey Young has developed Apache::HEADRegistry is just a subclass
  +  of Apache::Registry that is HEAD request aware:
  +  
http:[EMAIL PROTECTED]
  +  consider integrating in the core as the default behavior or a subclass.
  +
   - Bjarni R. Einarsson <[EMAIL PROTECTED]> has suggested this Registry hack
 http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=98961929702745&w=2
 Message-ID: <[EMAIL PROTECTED]>
  
  
  



cvs commit: modperl-2.0 Changes

2002-11-25 Thread stas
stas2002/11/25 19:48:42

  Modified:xs/APR/PerlIO apr_perlio.h
   .Changes
  Log:
  define IoTYPE_RDONLY/IoTYPE_WRONLY for perl-5.6.0 so the project
  compiles again under 5.6.0
  
  Revision  ChangesPath
  1.4   +8 -0  modperl-2.0/xs/APR/PerlIO/apr_perlio.h
  
  Index: apr_perlio.h
  ===
  RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/apr_perlio.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_perlio.h  21 Jun 2002 15:28:43 -  1.3
  +++ apr_perlio.h  26 Nov 2002 03:48:42 -  1.4
  @@ -15,6 +15,14 @@
   #include "apr_optional.h"
   #endif
   
  +/* 5.6.0 */
  +#ifndef IoTYPE_RDONLY
  +#define IoTYPE_RDONLY '<'
  +#endif
  +#ifndef IoTYPE_WRONLY
  +#define IoTYPE_WRONLY '>'
  +#endif
  +
   typedef enum {
   APR_PERLIO_HOOK_READ,
   APR_PERLIO_HOOK_WRITE
  
  
  
  1.64  +3 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- Changes   25 Nov 2002 22:46:29 -  1.63
  +++ Changes   26 Nov 2002 03:48:42 -  1.64
  @@ -10,6 +10,9 @@
   
   =item 1.99_08-dev
   
  +define IoTYPE_RDONLY/IoTYPE_WRONLY for perl-5.6.0 so the project
  +compiles again under 5.6.0 [Stas Bekman]
  +
   Allow output streaming filters to append data to the end of the stream
   [Stas Bekman]
   
  
  
  



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

2002-11-25 Thread stas
stas2002/11/25 14:47:40

  Modified:src/modules/perl modperl_filter.c
  Log:
  add a few debug trace prints
  
  Revision  ChangesPath
  1.40  +6 -0  modperl-2.0/src/modules/perl/modperl_filter.c
  
  Index: modperl_filter.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- modperl_filter.c  25 Nov 2002 22:46:29 -  1.39
  +++ modperl_filter.c  25 Nov 2002 22:47:39 -  1.40
  @@ -470,6 +470,9 @@
   ctx = (modperl_filter_ctx_t *)apr_pcalloc(c->pool, sizeof(*ctx));
   ctx->handler = handlers[i];
   addfunc(name, (void*)ctx, NULL, c);
  +
  +MP_TRACE_h(MP_FUNC, "%s handler %s configured (connection)\n",
  +   type, handlers[i]->name);
   }
   
   return OK;
  @@ -529,6 +532,9 @@
   ctx = (modperl_filter_ctx_t *)apr_pcalloc(r->pool, sizeof(*ctx));
   ctx->handler = handlers[i];
   addfunc(name, (void*)ctx, r, r->connection);
  +
  +MP_TRACE_h(MP_FUNC, "%s handler %s configured (%s)\n",
  +   type, handlers[i]->name, r->uri);
   }
   
   return OK;
  
  
  



cvs commit: modperl-2.0 Changes

2002-11-25 Thread stas
stas2002/11/25 14:46:29

  Modified:t/filter .cvsignore
   src/modules/perl modperl_filter.c modperl_types.h
   t/filter/TestFilter reverse.pm
   .Changes
  Added:   t/htdocs/filter reverse.txt
   t/filter reverse.t
  Log:
  Allow output streaming filters to append data to the end of the stream, by
  postponing the propogation of the EOS bucket down the stream till the
  handler is returned. + tests
  
  Revision  ChangesPath
  1.1  modperl-2.0/t/htdocs/filter/reverse.txt
  
  Index: reverse.txt
  ===
  zyxwvutsrqponmlkjihgfedcba
  9876543210
  
  
  
  1.3   +1 -1  modperl-2.0/t/filter/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/modperl-2.0/t/filter/.cvsignore,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- .cvsignore12 Sep 2001 17:11:48 -  1.2
  +++ .cvsignore25 Nov 2002 22:46:29 -  1.3
  @@ -3,4 +3,4 @@
   input_body.t
   input_msg.t
   lc.t
  -reverse.t
  +
  
  
  
  1.3   +28 -3 modperl-2.0/t/filter/reverse.t
  
  
  
  
  1.39  +14 -2 modperl-2.0/src/modules/perl/modperl_filter.c
  
  Index: modperl_filter.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- modperl_filter.c  19 Aug 2002 20:07:01 -  1.38
  +++ modperl_filter.c  25 Nov 2002 22:46:29 -  1.39
  @@ -157,6 +157,17 @@
   
   MP_TRACE_f(MP_FUNC, "%s returned %d\n", handler->name, status);
   
  +/* when the streaming filter is invoked it should be able to send
  + * extra data, after the read in a while() loop is finished.
  + * Therefore we need to postpone propogating the EOS bucket, up
  + * until the filter handler is returned and only then send the EOS
  + * bucket if the stream had one.
  + */
  +if (filter->seen_eos) {
  +filter->eos = 1;
  +filter->seen_eos = 0;
  +}
  +
   if (filter->mode == MP_OUTPUT_FILTER_MODE) {
   modperl_output_filter_flush(filter);
   }
  @@ -213,7 +224,8 @@
   return 1;
   }
   else if (MP_FILTER_IS_EOS(filter)) {
  -filter->eos = 1;
  +MP_TRACE_f(MP_FUNC, "received EOS bucket\n");
  +filter->seen_eos = 1;
   return 1;
   }
   else if (filter->bucket != MP_FILTER_SENTINEL(filter)) {
  @@ -281,7 +293,7 @@
   
   if (MP_FILTER_IS_EOS(filter)) {
   MP_TRACE_f(MP_FUNC, "received EOS bucket\n");
  -filter->eos = 1;
  +filter->seen_eos = 1;
   break;
   }
   else if (MP_FILTER_IS_FLUSH(filter)) {
  
  
  
  1.63  +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.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- modperl_types.h   15 Sep 2002 23:30:06 -  1.62
  +++ modperl_types.h   25 Nov 2002 22:46:29 -  1.63
  @@ -184,6 +184,7 @@
   } modperl_filter_mode_e;
   
   typedef struct {
  +int seen_eos;
   int eos;
   int flush;
   ap_filter_t *f;
  
  
  
  1.4   +16 -5 modperl-2.0/t/filter/TestFilter/reverse.pm
  
  Index: reverse.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/reverse.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- reverse.pm11 Apr 2002 11:08:43 -  1.3
  +++ reverse.pm25 Nov 2002 22:46:29 -  1.4
  @@ -7,7 +7,7 @@
   use Apache::RequestIO ();
   use Apache::Filter ();
   
  -use Apache::Const -compile => 'OK';
  +use Apache::Const -compile => qw(OK M_POST);
   
   sub handler {
   my $filter = shift;
  @@ -18,21 +18,32 @@
   $filter->print("\n");
   }
   }
  +$filter->print("Reversed by mod_perl 2.0\n");
   
  -0;
  +return Apache::OK;
   }
   
   sub response {
   my $r = shift;
   
   $r->content_type('text/plain');
  -$r->puts(scalar reverse "1..1\n");
  -$r->puts(scalar reverse "ok 1\n");
   
  -Apache::OK;
  +if ($r->method_number == Apache::M_POST) {
  +my $data = ModPerl::Test::read_post($r);
  +$r->puts($data);
  +}
  +
  +return Apache::OK;
   }
   
   1;
   __DATA__
  +
  +
  +PerlOutputFilterHandler TestFilter::reverse
  +
  +
  +
   SetHandler modperl
   PerlResponseHandler TestFilter::reverse::response
  +
  
  
  
  1.63  +3 -0  modperl-2.0/Changes
  
  Index: Changes
  =

cvs commit: modperl-2.0/t/htdocs/filter - New directory

2002-11-25 Thread stas
stas2002/11/25 14:36:22

  modperl-2.0/t/htdocs/filter - New directory