httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From the...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRequest.pm
Date Tue, 26 Oct 2004 01:48:16 GMT
theory      2004/10/25 18:48:16

  Modified:    perl-framework/Apache-Test/lib/Apache TestRequest.pm
  Log:
  Try to respect test scripts setting RedirectOK directly.
  
  Revision  Changes    Path
  1.102     +9 -5      httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm
  
  Index: TestRequest.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- TestRequest.pm	22 Oct 2004 22:09:54 -0000	1.101
  +++ TestRequest.pm	26 Oct 2004 01:48:16 -0000	1.102
  @@ -116,11 +116,14 @@
       if (exists $args->{requests_redirectable}) {
           my $redir = $args->{requests_redirectable};
           if (ref $redir and (@$redir > 1 or $redir->[0] ne 'POST')) {
  -            $RedirectOK = 1;
  +            $RedirectOK = $have_lwp ? undef : 1;
           } elsif ($redir) {
  -            $args->{requests_redirectable} = [ qw/GET HEAD POST/ ]
  -                if $have_lwp;
  -            $RedirectOK = 1;
  +            if ($have_lwp) {
  +                $args->{requests_redirectable} = [ qw/GET HEAD POST/ ];
  +                $RedirectOK = undef;
  +            } else {
  +                $RedirectOK = 1;
  +            }
           } else {
               $RedirectOK = 0;
           }
  @@ -200,7 +203,8 @@
   
   sub redirect_ok {
       my $self = shift;
  -    return $self->SUPER::redirect_ok(@_) if $have_lwp;
  +    return $self->SUPER::redirect_ok(@_)
  +      if $have_lwp && ! defined $RedirectOK;
       return 0 if shift->method eq 'POST';
       $RedirectOK;
   }
  
  
  

Mime
View raw message