perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/t/conf modperl_extra.pl
Date Fri, 12 Sep 2003 02:19:01 GMT
stas        2003/09/11 19:19:01

  Modified:    t/conf   modperl_extra.pl
  Log:
  better debug in ModPerl::Test::read_post
  
  Revision  Changes    Path
  1.32      +9 -2      modperl-2.0/t/conf/modperl_extra.pl
  
  Index: modperl_extra.pl
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -u -r1.31 -r1.32
  --- modperl_extra.pl	19 Jul 2003 09:57:05 -0000	1.31
  +++ modperl_extra.pl	12 Sep 2003 02:19:01 -0000	1.32
  @@ -97,6 +97,8 @@
   use Apache::Const -compile => qw(MODE_READBYTES);
   use APR::Const    -compile => qw(SUCCESS BLOCK_READ);
   
  +# to enable debug start with: (or simply run with -trace=debug)
  +# t/TEST -trace=debug -start
   sub ModPerl::Test::read_post {
       my $r = shift;
       my $debug = shift || 0;
  @@ -107,6 +109,7 @@
       my $ba = $r->connection->bucket_alloc;
       my $bb = APR::Brigade->new($r->pool, $ba);
   
  +    my $count = 0;
       do {
           my $rv = $filters->get_brigade($bb,
               Apache::MODE_READBYTES, APR::BLOCK_READ, IOBUFSIZE);
  @@ -114,6 +117,10 @@
               return $rv;
           }
   
  +        $count++;
  +
  +        warn "read_post: bb $count\n" if $debug;
  +
           while (!$bb->empty) {
               my $buf;
               my $b = $bb->first;
  @@ -121,16 +128,16 @@
               $b->remove;
   
               if ($b->is_eos) {
  -                warn "EOS bucket:\n" if $debug;
  +                warn "read_post: EOS bucket:\n" if $debug;
                   $seen_eos++;
                   last;
               }
   
               my $status = $b->read($buf);
  -            warn "DATA bucket: [$buf]\n" if $debug;
               if ($status != APR::SUCCESS) {
                   return $status;
               }
  +            warn "read_post: DATA bucket: [$buf]\n" if $debug;
               push @data, $buf;
           }
   
  
  
  

Mime
View raw message