stas        2003/01/17 17:59:22

  Modified:    ModPerl-Registry/lib/ModPerl RegistryCooker.pm
               .        Changes
  Log:
  Another fix for the handling of the return status in
  ModPerl::RegistryCooker: reset the status to the original one only if
  it was changed by the script, otherwise return the execution status
  
  Revision  Changes    Path
  1.28      +6 -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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- RegistryCooker.pm 6 Jan 2003 10:42:38 -0000       1.27
  +++ RegistryCooker.pm 18 Jan 2003 01:59:21 -0000      1.28
  @@ -163,9 +163,13 @@
       # handlers shouldn't set $r->status but return it
       my $old_status = $self->[REQ]->status;
       my $rc = $self->run;
  -    $self->[REQ]->status($old_status);
  +    my $new_status = $self->[REQ]->status;
   
  -    return ($rc != Apache::OK) ? $rc : $self->[STATUS];
  +    # only if the script has changed the status, reset to the old
  +    # status and return the new status
  +    return $old_status != $new_status 
  +        ? $self->[REQ]->status($old_status)
  +        : $rc;
   }
   
   #########################################################################
  
  
  
  1.105     +5 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- Changes   17 Jan 2003 03:23:24 -0000      1.104
  +++ Changes   18 Jan 2003 01:59:22 -0000      1.105
  @@ -10,6 +10,11 @@
   
   =item 1.99_09-dev
   
  +Another fix for the handling of the return status in
  +ModPerl::RegistryCooker: reset the status to the original one only if
  +it was changed by the script, otherwise return the execution status
  +[Stas]
  +
   prevent segfault in $r->print / $filter->print (in output filter) and
   related functions when they are called before the response phase
   [Stas]
  
  
  


Reply via email to