stas        2002/08/15 07:26:10

  Modified:    ModPerl-Registry/lib/ModPerl RegistryCooker.pm
  Log:
  sync with registry in mod_perl 1.0: properly handle return status
  
  Revision  Changes    Path
  1.16      +7 -2      modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
  
  Index: RegistryCooker.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- RegistryCooker.pm 15 Aug 2002 12:59:38 -0000      1.15
  +++ RegistryCooker.pm 15 Aug 2002 14:26:10 -0000      1.16
  @@ -146,7 +146,12 @@
           return $rc unless $rc == Apache::OK;
       }
   
  -    return $self->run;
  +    # handlers shouldn't set $r->status but return it
  +    my $old_status = $self->[REQ]->status;
  +    my $rc = $self->run;
  +    my $new_status = $self->[REQ]->status($old_status);
  +
  +    return ($rc != Apache::OK) ? $rc : $new_status;
   }
   
   #########################################################################
  @@ -178,7 +183,7 @@
   
       $self->flush_namespace;
   
  -    #$self->chdir_file("$Apache::Server::CWD/");
  +    #XXX: $self->chdir_file("$Apache::Server::CWD/");
   
       if ( ($rc = $self->error_check) != Apache::OK) {
           return $rc;
  
  
  


Reply via email to