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/hooks/TestHooks authen.pm authz.pm
Date Wed, 18 Jun 2003 08:59:04 GMT
stas        2003/06/18 01:59:04

  Modified:    t/hooks/TestHooks authen.pm authz.pm
  Log:
  use non-deprecated constants: 's|AUTH_REQUIRED|HTTP_UNAUTHORIZED|'
  
  Revision  Changes    Path
  1.6       +2 -2      modperl-2.0/t/hooks/TestHooks/authen.pm
  
  Index: authen.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/authen.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- authen.pm	11 Apr 2002 11:08:43 -0000	1.5
  +++ authen.pm	18 Jun 2003 08:59:04 -0000	1.6
  @@ -5,7 +5,7 @@
   
   use Apache::Access ();
   
  -use Apache::Const -compile => qw(OK AUTH_REQUIRED SERVER_ERROR);
  +use Apache::Const -compile => qw(OK HTTP_UNAUTHORIZED SERVER_ERROR);
   
   sub handler {
       my $r = shift;
  @@ -22,7 +22,7 @@
   
       unless ($user eq 'dougm' and $sent_pw eq 'foo') {
           $r->note_basic_auth_failure;
  -        return Apache::AUTH_REQUIRED;
  +        return Apache::HTTP_UNAUTHORIZED;
       }
   
       Apache::OK;
  
  
  
  1.4       +4 -4      modperl-2.0/t/hooks/TestHooks/authz.pm
  
  Index: authz.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/authz.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- authz.pm	31 Mar 2003 01:50:52 -0000	1.3
  +++ authz.pm	18 Jun 2003 08:59:04 -0000	1.4
  @@ -5,7 +5,7 @@
   
   use Apache::Access ();
   
  -use Apache::Const -compile => qw(OK AUTH_REQUIRED);
  +use Apache::Const -compile => qw(OK HTTP_UNAUTHORIZED);
   
   sub auth_any {
       my $r = shift;
  @@ -15,7 +15,7 @@
   
       unless($r->user and $sent_pw) {
   	$r->note_basic_auth_failure;
  -	return Apache::AUTH_REQUIRED;
  +	return Apache::HTTP_UNAUTHORIZED;
       }
   
       return Apache::OK;
  @@ -26,11 +26,11 @@
   
       my $user = $r->user;
   
  -    return Apache::AUTH_REQUIRED unless $user;
  +    return Apache::HTTP_UNAUTHORIZED unless $user;
   
       my($u, @allowed) = split /\s+/, $r->requires->[0]->{requirement};
   
  -    return Apache::AUTH_REQUIRED unless grep { $_ eq $user } @allowed;
  +    return Apache::HTTP_UNAUTHORIZED unless grep { $_ eq $user } @allowed;
   
       Apache::OK;
   }
  
  
  

Mime
View raw message